Ticket #98 (closed defect: fixed)
Patch: new i18n-system + convert-script
| Reported by: | Niko <ns@…> | Owned by: | niko |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Xinha Core | Version: | |
| Severity: | major | Keywords: | i18n new system |
| Cc: | mokhet@… |
Description
there was allready a short discussion on that: http://xinha.gogo.co.nz/punbb/viewtopic.php?id=63
and now i implemented the new i18n-system! I had to change of course all plugins to get them call the new _lc- function. Quite much work and a huge patch :D
how it works:
- file-names for the language-files are the same (just for now -new
added, will be removed later)
- i wrote a little php-script lcconvert.php that converts the old-style-
langage files into the new ones
- no js-errors when there is for one plugin the choosen language not
found
- you can use php-or-whatever backend for translation - with that you can
call getText or whatever (_editor_lcbackend = _editor_url+'/lcbackend.php?lang=%lang%&context=%context%';)
- using such a backend we could write a script that prints out all non-
translated texts - could be even written into a database - and we could write on the xinha-homepage a php-script where translators could translate online!
still to do:
- what happens with different charsets? If a language-file uses utf-8 (as
most does) but xinha runs as iso-8859-1 the special cahrs can't be displayed.
- (could be solved using a backend that converts into the used charset
(with an additional charset-parameter)
- test all plugins more (i did only a quick test)
- backward-compatibility: currenlty there is none - as the I18n-Object
doesn't exist anymore, but plugins might still use it! (should we still load it? or would it be possible to define for every plugin a "plugin- interface-version" to provide such compatibility?
two thinks i would like to mention (line numbers after applying the patch):
- htmlarea.js line 832: i don't understand what is happening here -
didn't change it.
- htmlarea.js line 3008: removed the confirm and going to mozilla.org -
as the text says something different
