- Posts: 4402
Internationalization
- PhracturedBlue
- Topic Author
- Offline
I made it so you can use '\n' in the language file, and merged your changes. I don' see the issue you are describing with box height though. can you explain the issue more? Also, check that is occurs with my latest code. I fixed some string length issues that may cause issues.FDR wrote: I've made some changes to the binding message in both languages, and pushed the changes.
It seems, that it can't calculate right the string lengths with the new font.
My message is the same row count, but it draws it to a much larger box...
I also fixed all compile warnings.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
The font's box went into the dialog header and into the button too...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
For now, the files need to be named lang1, lang2, ... because I don't have petit_fat configured for reading directories at the moment.
The 1st line in the language file should have the language name.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
+ Building 'emu_devo8.exe'
objs/emu_devo8-w32/calibrate_page.o: In function `lang_select_cb':
C:\MinGW\msys\1.0\home\FDR\src\deviation\src/pages/calibrate_page.c:246: undefin
ed reference to `LANGPage_Select'
collect2: ld returned 1 exit status
make: *** [emu_devo8.exe] Error 1
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
I made the space a little wider.FDR wrote: Could you send a fresh list of strings, I would translate it?
Here's a current string list
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please provide an example language file. it is likely we'll run into many buffer overruns initially as the variable strings weren't designed to handle the longer lengths of utf8. I don't see any problems with my (very limited) example.FDR wrote: Now if I have an incomplete language file, and changed to that language, going into either menu will cliking and blinking only...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
When I set the language to hungarian everything is ok: hungarian binding message comes on model change, both menus do work. But after a restart I cannot enter either menu, because it clicks redraws the display from black and shows the binding message, i.e. it restarts...
Please Log in or Create an account to join the conversation.
- wuselfuzz
- Offline
- Posts: 83
File is appended twice, ISO8859-1 and UTF8 versions.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
They supposed to be written on one line started with the : and using \n on line breaks.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
It works surprisingly well. Some strings will need to be shortened, and for some reason, the translation of 'Ele' doesn't show up properly, but otherwise it seems alright.
I've only tested in the emulator. I need to reinstall into the Tx to see what is going on with the watchdog there.
EDIT: the German file (even the one marked utf8) wasn't in proper UTF8 format. I converted it and now all the characters seem to show up ok. It'll still need some adjustment to be usable though.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
I don't know how the parsing is done, but could you do it that if the translated row is missing or empty, than use the original? That way translating things would be optional, or at least incomplete translations would work too, but I don't want to delete the :original rows to see what is still needed to translate...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
You can get this behavior if you replace the ':' with a '#' for untranslated stringsFDR wrote: I don't know how the parsing is done, but could you do it that if the translated row is missing or empty, than use the original? That way translating things would be optional, or at least incomplete translations would work too, but I don't want to delete the :original rows to see what is still needed to translate...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- FDR
- Offline
But it still restarts when I enter either menu when I turn the tx on next time...
When I change the language it is all good until I turn the tx off and the on again and trying to enter the menu. The binding message if yet ok.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
FDR wrote: So finally I've translated to hungarian, at least v1.0
But it still restarts when I enter either menu when I turn the tx on next time...
When I change the language it is all good until I turn the tx off and the on again and trying to enter the menu. The binding message if yet ok.
That is very weird. Does it happen with the german translation too?
I'll try loading it up on my Tx tonight.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Strange!
Everything seems equal: the line feeds, the encoding...
Mine is larger, but it did the same when it was only a few rows too.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- Internationalization