Opened 13 years ago

Closed 13 years ago

#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

Attachments (2)

xinha-lc-patch.tar.gz (16.2 KB) - added by Niko <ns@…> 13 years ago.
fr.js (5.5 KB) - added by mokhet 13 years ago.
/lang/fr.js based on /lang/de.js from changeset:76

Download all attachments as: .zip

Change History (12)

Changed 13 years ago by Niko <ns@…>

comment:1 Changed 13 years ago by gogo

In so far as character sets, I guess we will need to pass back to the backend/whatever the character set required.

In so far as backwards compatability - well, the old system was so broken with out of date translations anyway that I think in this case we shouldn't worry about backwards compatability and just go ahead and make all plugins only use the new system.

Niko, I sent you an email giving you commit access to the SVN so if you could commit youc changes that would be excelent. Also if you have some time you could do a quick search in the tickets for new translations (there is at least some german ones) and make those work with your new system.

I'll also give you Wiki access (same username and password as for SVN, just go to the "Login" link at the top of this page), so you can write some page(s) about how translators can translate for your new system.

comment:2 Changed 13 years ago by gogo

  • Owner changed from gogo to niko

comment:3 Changed 13 years ago by mokhet

  • Cc mokhet@… added

humm, i've send an up to date version of /lang/fr.js with revision #55 but it doesnt look acurate with this ticket. Before i'm going further in the translation (i need fr version between others), do i have to wait for this ticket to be closed to start translating or can i just translate actual system based on last revision ?

comment:4 Changed 13 years ago by niko

i just submitted your #55 - for future-translations please wait till this patch is commited.

comment:5 Changed 13 years ago by niko

comment:6 Changed 13 years ago by niko

commited as changeset:59
please review

comment:7 Changed 13 years ago by niko

oops... changeset:60 is the right one :D

comment:8 Changed 13 years ago by mokhet

/lang/fr.js updated from /lang/de.js of changeset:76

what is best for you ? Do you prefer we provide you a SVN patch, the full file, and should it be attached or inline the comment ? For this one, the attached file sounds the better choice (the patch is more big than original patch, and it's kinda long), but what is your favorite way ?

Changed 13 years ago by mokhet

/lang/fr.js based on /lang/de.js from changeset:76

comment:9 Changed 13 years ago by niko

commited in changeset:78
...if it is only one file just post in in a ticket (you could even create a new one)

if you have serveral files (plugins and so on) please post a zip file with the correct directory-structure in it!

comment:10 Changed 13 years ago by niko

  • Resolution set to fixed
  • Status changed from new to closed

closed the bug as the patch is allready commited...

Note: See TracTickets for help on using tickets.