Internationalization

More
25 Aug 2012 15:00 #1215 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization

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 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.
I also fixed all compile warnings.

Please Log in or Create an account to join the conversation.

More
25 Aug 2012 16:15 #1216 by FDR
Replied by FDR on topic Internationalization
Yep, it is good now.
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.

More
25 Aug 2012 16:18 #1217 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization
I've added the ability to change (and save) the Tx language now.
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.

More
25 Aug 2012 16:27 #1218 by FDR
Replied by FDR on topic Internationalization
Yeah, but it gives compile error:
+ 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.

More
25 Aug 2012 16:31 #1220 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization
fixed

Please Log in or Create an account to join the conversation.

More
25 Aug 2012 19:26 #1222 by FDR
Replied by FDR on topic Internationalization
The space is too narrow, it is hard to read... :(

Please Log in or Create an account to join the conversation.

More
25 Aug 2012 19:28 #1223 by FDR
Replied by FDR on topic Internationalization
Could you send a fresh list of strings, I would translate it?

Please Log in or Create an account to join the conversation.

More
25 Aug 2012 19:35 #1224 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization

FDR wrote: Could you send a fresh list of strings, I would translate it?

I made the space a little wider.

Here's a current string list
Attachments:

Please Log in or Create an account to join the conversation.

More
25 Aug 2012 20:36 #1226 by FDR
Replied by FDR on topic Internationalization
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.

More
25 Aug 2012 21:19 #1227 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization

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 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.

Please Log in or Create an account to join the conversation.

More
26 Aug 2012 06:03 #1230 by FDR
Replied by FDR on topic Internationalization
It is the one in my repo, which is almost identical to yours...
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.

More
27 Aug 2012 08:44 #1233 by wuselfuzz
Replied by wuselfuzz on topic Internationalization
Here's a first German translation. I wasn't entirely sure about how to handle multiline messages. There's also a few FIXMEs I have to see in proper context.

File is appended twice, ISO8859-1 and UTF8 versions.
Attachments:

Please Log in or Create an account to join the conversation.

More
27 Aug 2012 09:19 #1234 by FDR
Replied by FDR on topic Internationalization
Yeah, the multiline messages are wrong in the string.txt too...
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.

More
27 Aug 2012 14:56 - 27 Aug 2012 15:04 #1236 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization
I added the German translation to the language files (after some minor fixup)
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.
Last edit: 27 Aug 2012 15:04 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
27 Aug 2012 15:19 #1239 by FDR
Replied by FDR on topic Internationalization
Sorry, but I had no time to finish translating, and it seemed no urgent, since the tx couldn't use it anyway... ;)

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.

More
27 Aug 2012 15:30 #1241 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization

FDR 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...

You can get this behavior if you replace the ':' with a '#' for untranslated strings

Please Log in or Create an account to join the conversation.

More
27 Aug 2012 15:41 #1242 by FDR
Replied by FDR on topic Internationalization
Cool, thanks!

Please Log in or Create an account to join the conversation.

More
27 Aug 2012 19:28 #1245 by FDR
Replied by FDR on topic Internationalization
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.

Please Log in or Create an account to join the conversation.

More
27 Aug 2012 19:31 #1246 by PhracturedBlue
Replied by PhracturedBlue on topic Internationalization

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.

More
27 Aug 2012 19:37 #1247 by FDR
Replied by FDR on topic Internationalization
No it works! :blink:
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.

Time to create page: 0.075 seconds
Powered by Kunena Forum