GM Script Update Control

By Sylvain Comte Last update May 28, 2009 — Installed 1,534 times.

Language Translation

in
Subscribe to Language Translation 4 posts, 2 voices



NOrack Scriptwright
FirefoxWindows

I was going to contribute at translating part of your code into my language, but then after examining your code I saw that the sequence of the words in my language is different from english.
if you use language macro method, it might help me to do the translation.

instead of using this method:
[1] var GMSUCtextAlerte=Txt[1][lang]+" "+version+" "+Txt[2][lang]+" "+scriptName+"";
[2] GMSUCtextAlerte+=". "+Txt[3][lang]+" ("+offRel+")";
[3] GMSUCtextAlerte+="";

use macro method like this:
[1] var GMSUCtextAlerte = "You're using [version] version of [scriptname]";
[2] GMSUCtextAlerte+=" script. Official release version is different [scriptid]";
and so on.

then you may use string manipulation technic to replace [version], [scriptname] and other macros with the correct value or hyperlink.

it will be harder for people to translate, I guess, since people have to look into a string with html markup code in it; But you, as the coder, with this macro technic, do not have to bother yourself to learn so many language structures of the world.

it is just a humble suggestion, it might not be better than your already applied method.

 
Sylvain Comte Script's Author
FirefoxWindows

Thanks for the idea NOrack. And thanks for having the idea to translate. You're the first one! ;-)
I'll have a real look on this when i have time to. I was pretty sure to have problems with my method. But i'm not so sure I do understand yours very well.
As there are very few translators, i guess i could directly put your translation in my code. So post it if you want, it will be online soon...

 
NOrack Scriptwright
FirefoxWindows

I'm not good in explaining technical terms. maybe this example could help me to draw the picture of my idea more clearly.

If you put a language template with macro method like this:

[1] var GMSUCtextAlerte = "You're using [version] version of [scriptname]";
[2] GMSUCtextAlerte+=" script. Official release version is different [scriptid]";

and so on.
then you put a comment above this language template like this:

//This template will look like this when it is shown as dialog box:
//You're using 1.2 version of GM_Script_update_Control script. Official release
//version is different 2.3

etc.

Then I will replace the template value so it will look like this
(in Bahasa Indonesia, my language):

[1] var GMSUCtextAlerte = "Anda Menggunakan versi [version] dari kode skrip [scriptname]";
[2] GMSUCtextAlerte+=". Versi resmi berbeda dengan yang anda gunakan yaitu [scriptid]";

and so on.

 
NOrack Scriptwright
FirefoxWindows

Different languages utilize different templates:
GMSUCtextAlerte[EN]
GMSUCtextAlerte[ID]
GMSUCtextAlerte[SP]

where EN = english, ID = Bahasa Indonesia, SP = SPanish, etc.

And if you apply this suggestion, you will need to remove Txt[EN] template and other templates as well.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel