Russian Translation
- FDR
- Offline
Less
More
11 Oct 2013 10:51 #14493
by FDR
Replied by FDR on topic Russian Translation
I don't think we must make localized 7E versions, however those who can compile could make their own localized version.
A script or (pre)compile option would be great, which would replace all the english text from the language file found in the code with the translated value...
A script or (pre)compile option would be great, which would replace all the english text from the language file found in the code with the translated value...
Please Log in or Create an account to join the conversation.
- vlad_vy
- Topic Author
- Offline
Less
More
- Posts: 3333
11 Oct 2013 11:24 - 11 Oct 2013 11:24 #14494
by vlad_vy
Replied by vlad_vy on topic Russian Translation
Last edit: 11 Oct 2013 11:24 by vlad_vy.
Please Log in or Create an account to join the conversation.
- Neposeda_ua
- Offline
Less
More
- Posts: 5
11 Oct 2013 11:45 #14495
by Neposeda_ua
Replied by Neposeda_ua on topic Russian Translation
Please Log in or Create an account to join the conversation.
- vlad_vy
- Topic Author
- Offline
Less
More
- Posts: 3333
11 Oct 2013 11:57 - 11 Oct 2013 12:02 #14496
by vlad_vy
Replied by vlad_vy on topic Russian Translation
You can download source from
bitbucket.org/PhracturedBlue/deviation
You can see result for Devo 7e only if you build firmware or emulator. Latest Russian translation you can find at Nightly builds, filesystem for Devo10.
At source files you can search '_tr' substring for translatable items.
bitbucket.org/PhracturedBlue/deviation
You can see result for Devo 7e only if you build firmware or emulator. Latest Russian translation you can find at Nightly builds, filesystem for Devo10.
At source files you can search '_tr' substring for translatable items.
Last edit: 11 Oct 2013 12:02 by vlad_vy.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
11 Oct 2013 12:49 #14497
by rbe2012
Replied by rbe2012 on topic Russian Translation
I tried to change the term "Fixed ID" with the string from the Russian language file. Eclipse told me that I have to save the file in UTF8 and the string now looks completely different.
But when compiling I get error messages:They come from some additional tools used after compiling.
In the emulator the string looked like the one found in the language file. No Cyrillic letters...
I hope you will have more luck.
But when compiling I get error messages:
+ Copying template files for devo8
C:\MinGW\bin\xgettext.exe: Non-ASCII string at ./pages/320x240x16/model_page.c:100.
Please specify the source encoding through --from-code.
+ Checking string list length for devo8
C:\MinGW\bin\xgettext.exe: Non-ASCII string at ./pages/320x240x16/model_page.c:100.
Please specify the source encoding through --from-code.
In the emulator the string looked like the one found in the language file. No Cyrillic letters...
I hope you will have more luck.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Topic Author
- Offline
Less
More
- Posts: 3333
12 Oct 2013 05:49 - 12 Oct 2013 05:57 #14512
by vlad_vy
Replied by vlad_vy on topic Russian Translation
Last edit: 12 Oct 2013 05:57 by vlad_vy.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
12 Oct 2013 09:54 #14518
by rbe2012
Replied by rbe2012 on topic Russian Translation
I had these errors when I used _tr("Каналы") or _tr_noop("Каналы"); no problems when using only "Каналы".
Translating at compile time with a switch like "make TARGET=devo7e LANGUAGE=ru" is difficult because the C-files (and maybe header files) have to be changed in the source. This is not easily made in the actual working directory, if you want to have back the original files at the end...
The only way I see will be this way:
- make a complete copy of the working tree
- move to that intermediate tree
- translate the text in all files
- make the build
- move the resulting files to the original tree
- go back to the original tree
- remove the intermediate working tree
Looks quite complicated. Or am I missing something?
If the original files were changed you will get problems when pulling a new revision so this is no good option. Or: change the original files and revert the repository afterwards:
- translate the text in all files
- make the build
- revert the repo
Translating at compile time with a switch like "make TARGET=devo7e LANGUAGE=ru" is difficult because the C-files (and maybe header files) have to be changed in the source. This is not easily made in the actual working directory, if you want to have back the original files at the end...
The only way I see will be this way:
- make a complete copy of the working tree
- move to that intermediate tree
- translate the text in all files
- make the build
- move the resulting files to the original tree
- go back to the original tree
- remove the intermediate working tree
Looks quite complicated. Or am I missing something?
If the original files were changed you will get problems when pulling a new revision so this is no good option. Or: change the original files and revert the repository afterwards:
- translate the text in all files
- make the build
- revert the repo
Please Log in or Create an account to join the conversation.
- vlad_vy
- Topic Author
- Offline
Less
More
- Posts: 3333
12 Oct 2013 13:38 #14527
by vlad_vy
Replied by vlad_vy on topic Russian Translation
As it done at other localized software, all languages are equal.
File 'Language_English.lng'
[Metadata]
Version=160
Date=22.09.2012 13:41:26
[Main >> Menu]
0x1|TXT_MENU_CLASSIFICATION_TITLE=&Arrangement
0x2|TXT_MENU_RACE_TITLE=&Timekeeping
0x3|TXT_MENU_MAINDATA_TITLE=&Inventory Data
0x4|TXT_MENU_CONFIGURATION_TITLE=&Settings
0x5|TXT_MENU_TOOLS_TITLE=&Tools
0x6|TXT_MENU_PRINT_TITLE=&Print
0x7|TXT_MENU_WINDOWS_TITLE=&Windows
0x8|TXT_MENU_HELP_TITLE=&Help
0x9|TXT_MENU_FILE_CLOSE=Close
...
File 'Language_Russian.lng'
[Metadata]
Version=160
Date=22.09.2012 13:41:28
[Main >> Menu]
0x1|TXT_MENU_CLASSIFICATION_TITLE=&Формирование заездов
0x2|TXT_MENU_RACE_TITLE=&Хронометраж
0x3|TXT_MENU_MAINDATA_TITLE=&Данные
0x4|TXT_MENU_CONFIGURATION_TITLE=&Настройки
0x5|TXT_MENU_TOOLS_TITLE=&Инструменты
0x6|TXT_MENU_PRINT_TITLE=&Принтер
0x7|TXT_MENU_WINDOWS_TITLE=&Окна
0x8|TXT_MENU_HELP_TITLE=&Помощь
0x9|TXT_MENU_FILE_CLOSE=Закрыть
...
Source files don't contain any language strings.
File 'Language_English.lng'
[Metadata]
Version=160
Date=22.09.2012 13:41:26
[Main >> Menu]
0x1|TXT_MENU_CLASSIFICATION_TITLE=&Arrangement
0x2|TXT_MENU_RACE_TITLE=&Timekeeping
0x3|TXT_MENU_MAINDATA_TITLE=&Inventory Data
0x4|TXT_MENU_CONFIGURATION_TITLE=&Settings
0x5|TXT_MENU_TOOLS_TITLE=&Tools
0x6|TXT_MENU_PRINT_TITLE=&Print
0x7|TXT_MENU_WINDOWS_TITLE=&Windows
0x8|TXT_MENU_HELP_TITLE=&Help
0x9|TXT_MENU_FILE_CLOSE=Close
...
File 'Language_Russian.lng'
[Metadata]
Version=160
Date=22.09.2012 13:41:28
[Main >> Menu]
0x1|TXT_MENU_CLASSIFICATION_TITLE=&Формирование заездов
0x2|TXT_MENU_RACE_TITLE=&Хронометраж
0x3|TXT_MENU_MAINDATA_TITLE=&Данные
0x4|TXT_MENU_CONFIGURATION_TITLE=&Настройки
0x5|TXT_MENU_TOOLS_TITLE=&Инструменты
0x6|TXT_MENU_PRINT_TITLE=&Принтер
0x7|TXT_MENU_WINDOWS_TITLE=&Окна
0x8|TXT_MENU_HELP_TITLE=&Помощь
0x9|TXT_MENU_FILE_CLOSE=Закрыть
...
Source files don't contain any language strings.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
12 Oct 2013 17:39 #14533
by rbe2012
Replied by rbe2012 on topic Russian Translation
Ok, if you interpret the strings in the source code (which are all in English) as pointer to a string in a special language, you might be right.
But localized software will always work with a translation file which is added to the code (at compile time or later) and in the software you can choose to use one language or another.
The code will still contain the pointers and will be identical for every language the user chooses at runtime.
The problem for deviation is that the runtime translating uses so many resources that it will (actually and without massive improvements) not run in Devo7e. There might be implementations where the overhead is less, but we don't have such. In deviation there is a hash table build for translating. If I enable language support I get:
The challenge is: how can we implement a translation routine which needs less resources?
Or do we have other ways?
We could work for every supported language with a long list ofreplace all _tr("Arrangement") with _tr(TXT_MENU_ARRANGE). In normal builds we would include a special language file with(or the pointers will be the English text and we include the English file) so the pointer will stay in the code and we can use translation in combination with the other language files at runtime. For Devo7e we can invent a compile switch to choose a special language file so the pointers are replaced with the localized string (and the _tr()-function does nothing, just as it is now for Devo7e).
The more the text grows the more I feel getting confused. I try to explain my idea in other words: if we have a mechanism which replaces the strings at compile time without having to change the source files we can easily offer localized deviation variants. There might exist other ways to do that besides the #define I offer but actually I can't imagine one.
But localized software will always work with a translation file which is added to the code (at compile time or later) and in the software you can choose to use one language or another.
The code will still contain the pointers and will be identical for every language the user chooses at runtime.
The problem for deviation is that the runtime translating uses so many resources that it will (actually and without massive improvements) not run in Devo7e. There might be implementations where the overhead is less, but we don't have such. In deviation there is a hash table build for translating. If I enable language support I get:
+ Building 'devo7e.elf'
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: devo7e.elf section `.data' will not fit in region `rom'
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: devo7e.elf section `.bss' will not fit in region `ram'
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 1772 bytes
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld.exe: region `ram' overflowed by 3576 bytes
The challenge is: how can we implement a translation routine which needs less resources?
Or do we have other ways?
We could work for every supported language with a long list of
#define TXT_MENU_ARRANGE Arrangement
#define TXT_MENU_ARRANGE TXT_MENU_ARRANGE
The more the text grows the more I feel getting confused. I try to explain my idea in other words: if we have a mechanism which replaces the strings at compile time without having to change the source files we can easily offer localized deviation variants. There might exist other ways to do that besides the #define I offer but actually I can't imagine one.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Topic Author
- Offline
Less
More
- Posts: 3333
01 Jan 2014 07:16 - 01 Jan 2014 15:51 #17617
by vlad_vy
Replied by vlad_vy on topic Russian Translation
Module installation (Russian, .fodt)
deleted
Open page, wait 10 seconds, then press red button.
deleted
Open page, wait 10 seconds, then press red button.
Last edit: 01 Jan 2014 15:51 by vlad_vy.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
Less
More
- Posts: 4402
01 Jan 2014 15:38 #17644
by PhracturedBlue
Replied by PhracturedBlue on topic Russian Translation
Thanks. Updated
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
Less
More
- Posts: 4402
01 Jan 2014 17:39 #17650
by PhracturedBlue
Replied by PhracturedBlue on topic Russian Translation
FYI, I spent some time trying to build a native russian translation on the devo7e.
Using a few tricks, I am able to translate the strings in the binary without having to change the code. However there are 2 issues:
1) The Russian translation uses significantly more characters than the english equivalent (due to unicode encodings). It is so much so that the code overflows the ROM by 1200bytes on the dveo7e
2) Even in the emulator, it doesn't actually work. The problem is that we rely on the English strings for the ini files, and those no longer exist. So we'd need to translate all of the ini files into each language too.
Overall, this looks like a no-go for now.
Using a few tricks, I am able to translate the strings in the binary without having to change the code. However there are 2 issues:
1) The Russian translation uses significantly more characters than the english equivalent (due to unicode encodings). It is so much so that the code overflows the ROM by 1200bytes on the dveo7e
2) Even in the emulator, it doesn't actually work. The problem is that we rely on the English strings for the ini files, and those no longer exist. So we'd need to translate all of the ini files into each language too.
Overall, this looks like a no-go for now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.135 seconds
- Home
- Forum
- Model Configs, Templates, Skins
- Translations
- Russian Translation