Manage content and language file

已查看 114 次
跳至第一个未读帖子

Torgeir F

未读,
2016年2月24日 03:08:372016/2/24
收件人 ResourceSpace
Hi

We've recently installed the newest version of Resourcespace on a new/empty server for a customer.
We have had a couple of installations of version 7.0.6 for other customers before this, and here we have done quite a few alterations to the no.php language file.
This has previously worked very nicely.

Our idea for this new customer was merely to copy the no.php language file from an old server, and use this on the new server.
However, it seems like a lot of the translations in this file "doesn't stick", and even though I make alterations to the no.php file, it doesn't reflect on the language in the GUI.
It also seems that the bulk of the translations now is moved from the .php language file to the "manage content" menu in the GUI.
How does this work now? Can we use the .php language file to alter text in "manage content"? It seems that "manage content" writes directly to database, not to the .php file.

Is there a way to export the translations made in "manage content" to a file, and import it on another server?

Regards, Torgeir

Allison M Stec

未读,
2016年2月24日 08:34:342016/2/24
收件人 resour...@googlegroups.com
You'd have to export the site_text table rather than export the langs to a php file.

Out of curiosity, the changes you've made to no.php...are they customizations for existing language variables, inclusion of new translations, better translations? We're always looking for assistance with translations, so if you've improved the overall language file we could add those to the base code.

Any custom changes should really be held in a plugin so they aren't overwritten by updating. This would also allow you to migrate the customizations easily.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
ResourceSpace Developer
Reseller of Colorhythm's Prismpoint Portal DAM

Torgeir F

未读,
2016年2月24日 09:25:122016/2/24
收件人 ResourceSpace
Hi Again Allison

I've read the wiki on creating plugins for language files (Too bad I didn't read this earlier).
To answer your question:
- We've included a lot of new translations that did not exist for the no.php file.
- We've also changed quite a few of the translations because they were incorrect/did not suite our use. Good examples of the last one are these translations:
Themes ->  Kategorier
Collection -> Original was "Lysbord" . Our translation "Mappe"

Only by changing the Word Themes/Theme we had to change this word in 115 other places in the no.php file.
For other companies the translation of Collection -> Mappe,  might not be a good one, so this probably is not a good idea to include in a standard norwegian translation.

I will try to go through the default no.php file again on the "blank" server, and create a no.php with only our additions/alterations, and include this in a plugin.
As you stated this is probably the best way to avoid translations being overwritten, and also the best way to export translations to another server.

I'm still at loss as to how the "manage content" and language file "work together". Are they effectively the same thing now? What happens if you have one translation in no.php that conflicts with the same variable in "manage content"?

Allison M Stec

未读,
2016年2月24日 09:42:112016/2/24
收件人 resour...@googlegroups.com
If you would be interested in contributing some of you language changes let us know! I think Dan may have a document for you to fill out before you can contribute.

The updated functionality will use the langs in the language files as a base. It then uses anything stored in the site_text table (editable via the manage content page) to override language file settings.

The great thing about this new setup is the increased control of site text from the application...no back end knowledge really needed!

The difficult thing about it is that the only current way to convert site_text records to langs is with a tool that exports all records for that language. A little work to the tools script to allow using an existing lang file as a record filter would be a great improvement!
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Torgeir F

未读,
2016年3月1日 08:41:502016/3/1
收件人 ResourceSpace
Hi

I've been trying to get a language plugin going, but I'm having some trouble:

I've made a older structure on my own pc consisting of:

root folder called : mit_language
- On the root of this folder: mit_language.yaml
- A folder under the root folder called: languages
- Under this folder a file called: no.php

The mit_language.yaml containing these lines:
name: MIT_language
author: author
version: 1.0
desc: blabla

The no.php file is formatted like the original language file, but just contains the lines that have been altered from the original file.

I have tried zipping the whole root folder with files to a single tar.gz archive, and then renamed this to mit_language.rsp .
When i try uploading this via the "manage plugins" page, nothing happens. It just opens a blank page calle team_plugins.php.

What's wrong ? :)

Allison M Stec

未读,
2016年3月1日 08:45:282016/3/1
收件人 resour...@googlegroups.com
You need a .yaml file in your plugin: http://wiki.resourcespace.org/index.php/Writing_plugins

Torgeir F

未读,
2016年3月1日 09:09:292016/3/1
收件人 ResourceSpace
I have a .yaml file in the plugin.
It's called mit_language.yaml, and it's placed on the root of the plugin folder. (the folder with the same name as the plugin).
I'm quite sure I've folowed the wiki to the best of my abilities :)

Allison M Stec

未读,
2016年3月1日 09:24:552016/3/1
收件人 resour...@googlegroups.com
Sorry...missed that line in your initial post (need more coffee!!)

The name set in the yaml file must match the plugin folder name exactly. Try switching the uppercase "MIT" for lowercase.

Torgeir F

未读,
2016年3月2日 04:50:262016/3/2
收件人 ResourceSpace
Hi

Verified that the name of the yaml file , the folder and the "name" in the yaml file is all in lowercase and has the same name. Still no luck.
Can is see a log for what's happening somewhere?
We're running on a CentOS system.

Allison M Stec

未读,
2016年3月2日 08:17:082016/3/2
收件人 resour...@googlegroups.com
If the new plugin isn't showing as an available plugin I'd verify that the plugin folder permissions match those of the other plugins.

If things look good or there's no change in availability, I'd guess there's still something off about your yaml file. Post the contents and we'll review.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Torgeir F

未读,
2016年3月7日 06:44:302016/3/7
收件人 ResourceSpace
Hi

This works now. The problem I think has something to do with relative paths in the tar.gz file .
For the time being we don't need to import the plugin via the Web GUI, so we got it to work by copying the files to the right directory under plugins folder.
I have done the translating from English to Norwegian for all the new functionality in this version. (Everything under "My account")
If this is of interest to the RS project, I can share it.

Anders Stokke

未读,
2016年8月21日 06:22:372016/8/21
收件人 ResourceSpace
Torgeir: If RS is not interested I'd love to get a copy. 
For general use I think the collections -> "mapper" translation is better than "lysbord" for most users, you need to be an aging photographer to get the "lysbord" thing (en: lightboxes). 
If Torgeir is not around here anymore I could do the norwegian translation if i can get a list with new terms since the no.php file in the svg repo. (I have also made a norwegian translation of the stop words for the config.php file / $noadd based on the same source as the swedish one included)

Dan Huby

未读,
2016年8月22日 07:58:042016/8/22
收件人 ResourceSpace
Hi Anders,

It would be great to get an updated Norwegian translation. If you send an updated file and a signed CLA (http://www.resourcespace.com/docs/ResourceSpace_License_Agreement.pdf) I will add it to the project.

Thanks,

Dan

Anders Stokke

未读,
2016年8月22日 08:05:572016/8/22
收件人 ResourceSpace
Sure. What is the best way (workflow-wise) to combine a blank language-file with the existing norwegian one? Does a blank language file even exist, or would I have to compare all of the 2k2 lines?

Anders

Torgeir F

未读,
2016年8月22日 08:34:152016/8/22
收件人 ResourceSpace
Hi

I'm still around. Other projects taking up more time :)
I'll share the bitbucket link for the language plugin.
回复全部
回复作者
转发
0 个新帖子