Page 1 of 1

i18n tinkering

Posted: Fri Apr 19, 2013 8:38 pm
by cmb
Hello Community,

in CMSimple_XH there's quite some tinkering regarding i18n. This leads to several clumsy localizations, e.g. in German one can read:
  • Editieren Website Konfiguration
  • Ansehen Log-Datei
  • Undefiniert Datei
  • Nicht schreibbar Template-Datei
This may be even worse for other languages. We should consider cleaning this up in CMSimple_XH 1.6 (see http://www.cmsimple-xh.org/wiki/doku.ph ... etrization).

Note, however, that we probably have to stick with several existing language strings for backward compatibility with plugins, and that a cleanup for the core is likely to introduce a whole bunch of additional language strings.

Christoph

Re: i18n tinkering

Posted: Fri Jul 05, 2013 10:07 pm
by cmb
I have improved the internationalization of the search results, which was assumably clumsy for some languages (r615). The clumsy wording regarding some actions is only used on the settings page, which might be completely removed.

On having had a closer look at the clumsy error notices, I'm not sure anymore, if we should try to improve this (for now at least). These error messages are typically constructed by e(), which receives a key for $tx['error'] and a key for $tx['filetype'] and simply concatenates the strings. At first I thought we could do something like:

Code: Select all

$tx['error']['notwritable']="The %s is not writeable"; 
But that doesn't work for arbitrary languages. In Germany it would have to be "Die %s ist nicht schreibbar", what would be okay for a file. But what about a folder: "Die Ordner ist nicht schreibbar". This could be catered for by avoiding the article: "%s is not writeable", but that already isn't as nice as it should be, and above all I expect problems for other languages. A solution would be to have separate language strings for all combinations, but as there are 10 filetypes we would end up with 90 new language strings. As these messages are solely used as error messages, they are normaly not shown in the front-end of the website. So we may consider to stick with the clumsy wording. The webmaster might be able to bear with them.

Other clumsy constructions seem to be relicts of the old internal filebrowser, which was removed from CMSimple_XH 1.5:

Code: Select all

$tx['error']['tolarge']="is too large! Maximum size is set to";
$tx['error']['wrongext']="Wrong file extension in";
$tx['files']['bytes']="bytes";
$tx['files']['totalsize']="Total size";
$tx['images']['usedin']="Used in";
$tx['result']['uploaded']="uploaded";
These are not used anymore by the core or the standard plugins, and I guess they are not used by other extensions, so we can simply remove them (except for $tx['images']['usedin'] which is used by the filebrowser, and should be moved to its own language files).

Other than that I found the following relicts of the old plugin selectbox resp. some former error handling in the pluginloader:

Code: Select all

$tx['menu']['available_plugins']="Plugins: ";
$tx['menu']['select_plugin']="Select plugin ...";
$tx['error']['plugin_error']="Plugin error: ";
I suggest to remove them.

What remains is the internationalization of the link checker ($tx['link'][] and $tx['validate'][]), which may be changed when the link checker will be overhauled.

Re: i18n tinkering

Posted: Sat Jul 06, 2013 4:54 am
by Tata
Any clumsy wording may be solved by replacing words by symbols. The qustion the would be, how to drop these warnings/messages/notices combined by symbols (pictograms). Anyway, the "wording" then would match any language.
The symbols (icons) then could be combined wit a pencil for symbol of permission, eye symbol for read, and:
gray - if not active, doesn't exist, not applied
color - if everything is OK
crossed - if wrong setting, perission etc.

Re: i18n tinkering

Posted: Sat Jul 06, 2013 12:29 pm
by cmb
Hmm, intriguing idea! For clarity the icons could have a title attribute which is set by the existing language strings. Would be a good idea to experiment how this could look like.

We have the following filetypes:

Code: Select all

$tx['filetype']['backup']="backup";
$tx['filetype']['config']="CMS configuration";
$tx['filetype']['content']="content file";
$tx['filetype']['execute']="execute";
$tx['filetype']['file']="file";
$tx['filetype']['folder']="folder";
$tx['filetype']['language']="language file";
$tx['filetype']['log']="log";
$tx['filetype']['stylesheet']="stylesheet";
$tx['filetype']['template']="template";
And the following errors:

Code: Select all

$tx['error']['alreadyexists']="Already exists";
$tx['error']['cntdelete']="Could not delete";
$tx['error']['cntopen']="Could not open";
$tx['error']['cntsave']="Could not save";
$tx['error']['cntwriteto']="Could not write to";
$tx['error']['missing']="Missing";
$tx['error']['notreadable']="Not readable";
$tx['error']['notwritable']="Not writeable";
$tx['error']['undefined']="Undefined";
Currently a typical error message reads:
Not writeable content file
./content/content.htm
Has anybody some idea how this can be changed to use icons and to look good? Please note that we cannot easily change the filetypes or errors, as these are used by existing plugins.