Translations in open9x
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Translations in open9x
Hi,
It's now possible to add your own translations to open9x. Here is the way to do it:
1) You download this file:
http://code.google.com/p/open9x/source/ ... tions/en.h
2) You begin translating all the strings "..."
You will find 2 parts in the file:
- the non zero terminated strings at first, define as in this example:
#define LEN_VBEEPER 5
#define TR_VBEEPER "Quiet""NoKey""Norm ""Long ""xLong"
for this kind of strings it's important to keep the same number of chars in all substrings
this length is defined in LEN_VBEEPER, but if you really need, it's possible to increase (a little bit!) this value, careful to the screen which is not so big!
- the zero terminated strings at last as in this example:
#define TR_ELIMITS "E.Limits"
no length to define, the '\0' char at the end of the string is stored in flash for this purpose
3) You post your translations here or you attach it to an issue to the open9x project, I will integrate them and you should be able to retrieve the binary from companion9x in the following version (I plan to add a combo box for the language selection)
----
Not mandatory, but useful, there is a simu (linux only) embedded inside open9x which allows you to "test" your strings. You will need the libfox installed.
- you replace the contents of the file translations/fr.h with your translations
- you execute
make simu TRANSLATIONS=FR
./simu
In the simu you use the arrow keys, Enter and Backspace + 's' for the snapshots you will have these png dumped:
It's now possible to add your own translations to open9x. Here is the way to do it:
1) You download this file:
http://code.google.com/p/open9x/source/ ... tions/en.h
2) You begin translating all the strings "..."
You will find 2 parts in the file:
- the non zero terminated strings at first, define as in this example:
#define LEN_VBEEPER 5
#define TR_VBEEPER "Quiet""NoKey""Norm ""Long ""xLong"
for this kind of strings it's important to keep the same number of chars in all substrings
this length is defined in LEN_VBEEPER, but if you really need, it's possible to increase (a little bit!) this value, careful to the screen which is not so big!
- the zero terminated strings at last as in this example:
#define TR_ELIMITS "E.Limits"
no length to define, the '\0' char at the end of the string is stored in flash for this purpose
3) You post your translations here or you attach it to an issue to the open9x project, I will integrate them and you should be able to retrieve the binary from companion9x in the following version (I plan to add a combo box for the language selection)
----
Not mandatory, but useful, there is a simu (linux only) embedded inside open9x which allows you to "test" your strings. You will need the libfox installed.
- you replace the contents of the file translations/fr.h with your translations
- you execute
make simu TRANSLATIONS=FR
./simu
In the simu you use the arrow keys, Enter and Backspace + 's' for the snapshots you will have these png dumped:
Re: Translations in open9x
Hi,
Since I am planning to start flying helicopters my old flight radio doesn't cut it any more and I have orderd a 9x. One of the things I hate with complex flight radios is that the crampt displays make for use of a lot of abreviations. It is hard enough to understand English flight terms. Understastanding abreviated English flight terms is painful. At least for me, since my native language is Swedish. I would love to have a flight radio with Swedish menues.
Long story short, I looked around yesterday and found that you have made a real effort to make open9x translatable. I have now got a translated Swedsih versino of the ROM running in the simulator (which by the way works great). Would you be interested in the translated files? I have only given them a couple of hours this far, so they are not perfect. Some of the chopper terms are actually new to me, and I have not found good Swedish translations. But I will get there.
In order to translate English into Swedish it is necessary to use the letters å, ä and ö. You really can not replace them with variations of a and o like aa, ae and oe. That would be plain confusing. I have modified the font files and replaced {|} and [\] with åäö and ÅÄÖ, which is the standard way of mapping Swedish characters to single byte ASCII. I have also changed the appearance of the characters ( and ), so that they may be used in stead of [ and ]. The other characters are not used. Although it is perfectly possible to use the resulting font bitmaps for English, I am afraid that every aditional translation will require changes to the font bitmaps. Changes that will probably not fit together in a common file. I believe that it is necessary to use a sepate (or two, since the fonts exist in two sizes) font bitmap for each language. Should be easy enough to set up using the compile time LANGUAGE switch.
When I was at it i threw together a new splash screen, since the original one was kind of plain. I am not sure that mine is any better, but the result is shown below.
Since I am planning to start flying helicopters my old flight radio doesn't cut it any more and I have orderd a 9x. One of the things I hate with complex flight radios is that the crampt displays make for use of a lot of abreviations. It is hard enough to understand English flight terms. Understastanding abreviated English flight terms is painful. At least for me, since my native language is Swedish. I would love to have a flight radio with Swedish menues.
Long story short, I looked around yesterday and found that you have made a real effort to make open9x translatable. I have now got a translated Swedsih versino of the ROM running in the simulator (which by the way works great). Would you be interested in the translated files? I have only given them a couple of hours this far, so they are not perfect. Some of the chopper terms are actually new to me, and I have not found good Swedish translations. But I will get there.
In order to translate English into Swedish it is necessary to use the letters å, ä and ö. You really can not replace them with variations of a and o like aa, ae and oe. That would be plain confusing. I have modified the font files and replaced {|} and [\] with åäö and ÅÄÖ, which is the standard way of mapping Swedish characters to single byte ASCII. I have also changed the appearance of the characters ( and ), so that they may be used in stead of [ and ]. The other characters are not used. Although it is perfectly possible to use the resulting font bitmaps for English, I am afraid that every aditional translation will require changes to the font bitmaps. Changes that will probably not fit together in a common file. I believe that it is necessary to use a sepate (or two, since the fonts exist in two sizes) font bitmap for each language. Should be easy enough to set up using the compile time LANGUAGE switch.
When I was at it i threw together a new splash screen, since the original one was kind of plain. I am not sure that mine is any better, but the result is shown below.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Nice work!
How many new chars did you introduce?
Right now I am not sure about replacing existing ones, I think I will introduce extra chars for localization to achieve the same result.
In french we could then use the chars éàèêùç and that's interesting!
Bertrand.
How many new chars did you introduce?
Right now I am not sure about replacing existing ones, I think I will introduce extra chars for localization to achieve the same result.
In french we could then use the chars éàèêùç and that's interesting!
Bertrand.
Re: Translations in open9x
I have now created separate font bitmap files and attached them to issues in your google code project space.
I understand that you prefer extending the character set instead of using language specific font bitmaps. This is indeed the more ambitious aproach, but it will require quite a bit of work on your side.
I have not looked at the code, but I assume that strings within the hex are represented as single byte characters (everything else would be an unexplicable vaste of space). This means that characters like åäöÅÄÖ and éàèêùç can not be represented. The best way to solve the problem is to use UTF-8 encoding. UTF-8 encoded text displays well in web browsers, which is a big plus.
If characters are represented as Unicode two byte characters, your only problem will be to discover "non standard" characters and retrieve bitmaps from your extended bitmap for these. You will need some kind of cross reference table. Should not be to difficult.
I understand that you prefer extending the character set instead of using language specific font bitmaps. This is indeed the more ambitious aproach, but it will require quite a bit of work on your side.
I have not looked at the code, but I assume that strings within the hex are represented as single byte characters (everything else would be an unexplicable vaste of space). This means that characters like åäöÅÄÖ and éàèêùç can not be represented. The best way to solve the problem is to use UTF-8 encoding. UTF-8 encoded text displays well in web browsers, which is a big plus.
If characters are represented as Unicode two byte characters, your only problem will be to discover "non standard" characters and retrieve bitmaps from your extended bitmap for these. You will need some kind of cross reference table. Should not be to difficult.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
You will have to use these chars \200 .. \205 for these 6 new chars.
Some more work, that's true, but worth the case.
It works in my workspace, I will commit tomorrow with some other features. More on that later...
Bertrand.
Some more work, that's true, but worth the case.
It works in my workspace, I will commit tomorrow with some other features. More on that later...
Bertrand.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Today a lot of emails. Including commit logs for Italian translations from Romolo's team and Czech translations. It means that today we have:
- french
- swedish
- italian
- czech
I do like the idea used for the "Delta Zvuku" parameter. If some graphic designers have a look to it, I would be happy to have a "non text" version of that! (at least for the ersky9x board)
Bertrand.
- french
- swedish
- italian
- czech
I do like the idea used for the "Delta Zvuku" parameter. If some graphic designers have a look to it, I would be happy to have a "non text" version of that! (at least for the ersky9x board)
Bertrand.
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Translations in open9x
Are you looking for a slider type incramental thing?
---
I am here: http://tapatalk.com/map.php?gl3vpa
---
I am here: http://tapatalk.com/map.php?gl3vpa
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Yes, why not? At least for ersky9x board I would see it for Brightness / Sound volume / Haptic length / Audio length / Antenna length / ...
Bertrand.
Bertrand.
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Translations in open9x
I'll send you something later today, i'm at work.
I've always thought it should be sliders, looks cooler.
---
I am here: http://tapatalk.com/map.php?gg2nvc
I've always thought it should be sliders, looks cooler.
---
I am here: http://tapatalk.com/map.php?gg2nvc
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
<nagging>days are looong in ontario </nagging>
Bertrand.
Bertrand.
Re: Translations in open9x
Are you looking for something like this:
Or this:
Or this:
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: Translations in open9x
I like those, but I always liked a pop up window, makes the option have a finer feel. Something like...
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: Translations in open9x
and error message pages..
Just something a little different.. I am going out to fly now, it's beautiful weather today!
Just something a little different.. I am going out to fly now, it's beautiful weather today!
Re: Translations in open9x
lucky you.. raining here..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Excellent, thanks you both, I will see what I can do with it!
Bertrand.
Bertrand.
Re: Translations in open9x
"0----""=0---""==0--""===0-""====0"
")----"":)---""=:)--""==:)-""===:)" but then we must do a wiki explanation.
")----"":)---""=:)--""==:)-""===:)" but then we must do a wiki explanation.
Re: Translations in open9x
I really like the idea of a graphical slider presentation. It would be possible to acomplish a semi-graphical slider in the standard firmware, without sacrificing any space at all. To do this one would redefine an unused character as slider character and use minus signs to indicate the length of the slider. The result could look like this:
or
Looking at the character map, the most obvious character for replacement is the dollar sign, which I have not seen used anywhere.
If another character was redefined as a longer minus sign the result could be as nice as this:
or
Looking at the character map, the most obvious character for replacement is the dollar sign, which I have not seen used anywhere.
If another character was redefined as a longer minus sign the result could be as nice as this:
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Translations in open9x
another possible one is to close the # on top and bottom using = for the remaining part of the bar
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
I have chosen to spare some flash - exactly 28bytes - to have this result:
Bertrand.
Bertrand.
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Translations in open9x
Is that a graphic, or text characters? I wondered if the graphic for the trim positions could be re-used.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
The horizontal line is graphics and the square is the $ char. You cannot have a line without any holes using only the chars.
And yes the trim could be reused, but I prefer the slider ...
Bertrand.
And yes the trim could be reused, but I prefer the slider ...
Bertrand.
-
- Posts: 7
- Joined: Sun May 13, 2012 6:48 pm
- Country: -
German Translation (Start ...)
Hi Folks,
i just started a german translation. Not everything can be translated due to space limitations. But i think it is a good beginning.
The files are attached.
i just started a german translation. Not everything can be translated due to space limitations. But i think it is a good beginning.
The files are attached.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Thanks! Too late for this release, it will be in the next one ...
Bertrand.
Bertrand.
-
- Posts: 7
- Joined: Sun May 13, 2012 6:48 pm
- Country: -
German Translation (Start ...) Bugs
I renamed the Switches for private purposes. By mistake i posted this file. Sorry.
Fixed this mistake and optimized a little - I also rearranged the german fontgraphics. Small and caps are grouped together.
I just have trouble generating the .lbm files with Windows 7. These packages are installed:
So someone else has to create them. Sorry.
Fixed this mistake and optimized a little - I also rearranged the german fontgraphics. Small and caps are grouped together.
I just have trouble generating the .lbm files with Windows 7. These packages are installed:
- PyQt-Py3.2-x86-gpl-4.9.1-1
- python-3.2.3
- rubyinstaller-1.9.3-p194
Code: Select all
f = file(sys.argv[2], "w")
NameError: name 'file' is not defined
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Ruby is not needed for open9x. I am more used to Python, that's the reason.
But I never tried the Python v3.x versions, would you try with version 2.7?
Could you send me a PM with your google mail, I will add you as a commiter as the other translations contributors.
Bertrand.
But I never tried the Python v3.x versions, would you try with version 2.7?
Could you send me a PM with your google mail, I will add you as a commiter as the other translations contributors.
Bertrand.
-
- Posts: 7
- Joined: Sun May 13, 2012 6:48 pm
- Country: -
Re: Translations in open9x
With Python 2.7 it worked
Sv: Translations in open9x
You can install Gimp on Windows 7 and edit both xbm and lbm files.
I am not a huge fan of Gimp, but it gets the job done and is open source, so I use it from time to time.
I am not a huge fan of Gimp, but it gets the job done and is open source, so I use it from time to time.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Only the xbm files are editable under gimp, the lbm are open9x only (not compatible with er9x).
Bertrand.
Bertrand.
- AlexCalibur
- Posts: 18
- Joined: Thu May 17, 2012 1:37 pm
- Country: -
- Location: France, @Clermont-Ferrand in the center or @Annecy, near Switzerland
Re: Translations in open9x
I'm actually try to working on French translation, but I don't find the way out to convert xbm to lbm.
There is a util/img2lbm.py script, but it doesn't seems to give me the expected result...
or maybe, my xbm file (font_fr.xbm), producted with The GIMP, is not correct.
Can you confirm if the following should work ...?
$ python img2lbm.py font_fr.xbm font_fr.lbm
The script fail on line 9 "f = file(sys.argv[2], "w")" with the following error :
IndexError: list index out of range
I've tried to install python-pyside-qtgui
I've tried with the font_de.xbm from svn without succes...
After more source code reading, it seems to have size parameters in img2lbm
After many try, no result
>>> What is the img2lbm usage/syntax ??? <<< (maybe it can be usefull to add it in comment inside the script ...)
Is someone can give me more precise instructions for font_XX.xbm generating and lbm conversion ? (Is it the same for boot spalsh screen ?)
I'm interrested too by the ttf file for the 'generic font' (maybe UTF-8 font....?)
There is a util/img2lbm.py script, but it doesn't seems to give me the expected result...
or maybe, my xbm file (font_fr.xbm), producted with The GIMP, is not correct.
Can you confirm if the following should work ...?
$ python img2lbm.py font_fr.xbm font_fr.lbm
The script fail on line 9 "f = file(sys.argv[2], "w")" with the following error :
IndexError: list index out of range
I've tried to install python-pyside-qtgui
I've tried with the font_de.xbm from svn without succes...
After more source code reading, it seems to have size parameters in img2lbm
After many try, no result
>>> What is the img2lbm usage/syntax ??? <<< (maybe it can be usefull to add it in comment inside the script ...)
Is someone can give me more precise instructions for font_XX.xbm generating and lbm conversion ? (Is it the same for boot spalsh screen ?)
I'm interrested too by the ttf file for the 'generic font' (maybe UTF-8 font....?)
GNU/Linux user since 2005
Debian (testing) and ubuntu (12.04), some Linux Mint on netbook.
Debian (testing) and ubuntu (12.04), some Linux Mint on netbook.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Translations in open9x
Here is the syntax:
python ../util/img2lbm.py ./font_6x1.xbm /tmp/test.lbm char
and
python ../util/translate.py ./translations/fr.h fr
python ../util/translate.py ./translations/fr.h.fr fr
Bertrand.
python ../util/img2lbm.py ./font_6x1.xbm /tmp/test.lbm char
and
python ../util/translate.py ./translations/fr.h fr
python ../util/translate.py ./translations/fr.h.fr fr
Bertrand.