md380tools icon indicating copy to clipboard operation
md380tools copied to clipboard

Menu and String Localization

Open amvidalrc opened this issue 8 years ago • 31 comments

Hello. Im trying to find the string of the original firmware to translate to Spanish. I have found the md380tool menu, but I want to know if I can modify the original strings of TYT fw. ¿Where can I find them? I want to translate to Spanish and German.

BR

amvidalrc avatar Jan 14 '17 12:01 amvidalrc

I can do Norwegian, Swedish and Danish.

  1. jan. 2017 1.49 p.m. skrev "amvidalrc" [email protected]:

Hello. Im trying to find the string of the original firmware to translate to Spanish. I have found the md380tool menu, but I want to know if I can modify the original strings of TYT fw. ¿Where can I find them? I want to translate to Spanish and German.

BR

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/travisgoodspeed/md380tools/issues/656, or mute the thread https://github.com/notifications/unsubscribe-auth/AQX6E3R81LciCBGrjfpImbq1YtzrEqf_ks5rSMRLgaJpZM4LjnYy .

geiraage avatar Jan 14 '17 13:01 geiraage

rabin2 -zzq foo.img identifies all strings in the image, including the UTF16 that the firmware likes so much. Add 0x0800c000 to get the address in device memory.

travisgoodspeed avatar Jan 14 '17 14:01 travisgoodspeed

What about the possibility of adding a language options on MD380Tools menu with instant change of strings? With rabin2 only get unreadable str's.

amvidalrc avatar Jan 15 '17 16:01 amvidalrc

Keep in mind that we only have a limited amount of memory in the precious internal Flash (not the SPI flash)... having multiple languages in there may be wasteful, when only one of them is only ever used. Maybe better to have a string table in the external flash (SPI), if that's not too much effort.

Wolf-DL4YHF avatar Jan 15 '17 20:01 Wolf-DL4YHF

Self-assigning.

I've begun code for static localization, which will produce firmware images for western languages. I'll spin up a separate issue for each language translation after the localization code is stabilized.

travisgoodspeed avatar Jan 15 '17 22:01 travisgoodspeed

i can translate to Portuguese (PT-PT)

paulomartinspt avatar Jan 16 '17 18:01 paulomartinspt

I' m ready for Italian

IK8JHL avatar Jan 17 '17 16:01 IK8JHL

Howdy y'all,

We are now ready for pull requests to add language support. Please send pull requests against /locales/strings.txt with the English line first, followed by your localized language. An example of the "Unprogrammed" error is provided in my yankee attempts at Hungarian, French, and German.

The localizing tool works, but it's very ugly C and ought to be rewritten before we distribute localized firmware. It does not provide safety checks that the new string is as short as the old.

Do not use accent marks, as the font has no support for them. If you must, include the accent-marked string as a comment above the accent-less string.

73 from New York, --Travis

travisgoodspeed avatar Jan 21 '17 04:01 travisgoodspeed

Sorry Travis im not sure to understood, must to write in strings.txt somthing like this ? :

# 0xc53c0 28 13 Delete Entry?
it Cancellare?
# 0xc53dc 26 12 Radio Enable
it Abilita radio
# 0xc53f8 28 13 Radio Disable
it Disabilita Radio
# 0xc5414 26 12 Edit Number:
it Edita Numero
# 0xc5430 26 12 Text Message
it Messaggio di Testo

and after send to you?

IK8JHL avatar Jan 21 '17 14:01 IK8JHL

Yup, that'll do just fine.

travisgoodspeed avatar Jan 21 '17 14:01 travisgoodspeed

Some German strings have been added with #661. See also 0044581, which adds matching English strings so that it will build.

travisgoodspeed avatar Jan 21 '17 15:01 travisgoodspeed

Sorry again for my inexperience , I have add parts of italian language in my file strings.txt but where i can send?

IK8JHL avatar Jan 21 '17 17:01 IK8JHL

No worries, neighbor. If you email it to me, Travis at Radiant Machines dot com, I'll take care of merging it for you.

travisgoodspeed avatar Jan 21 '17 17:01 travisgoodspeed

Do I have to run make dist in the locales directory?

Thank you in advance DL3KB

SlashBuster avatar Jan 23 '17 17:01 SlashBuster

Localization is not yet handled by the Makefiles. That might be added this weekend.

travisgoodspeed avatar Jan 23 '17 17:01 travisgoodspeed

So how can I compile it?

SlashBuster avatar Jan 23 '17 18:01 SlashBuster

I pushed a proper makefile for localizing D013.020, which is the non-GPS firmware, to DE, HU, IT, and ES. Run 'make clean flash-de' to flash the German firmware to your radio.

Please note that this is very experimental, and almost certainly some of the strings are illegally long, overwriting adjacent strings in memory. Run at your own risk.

travisgoodspeed avatar Jan 23 '17 18:01 travisgoodspeed

Something i can not clear for me , I enter directory locales , I run make clean flash-it , i write the radio .When the radio go on have write the Patched firmware not original with new language . I have tryed with flash-de and also flash-es Wath i do wrong ?

IK8JHL avatar Jan 25 '17 18:01 IK8JHL

The current Makefile only produces patched firmware. You can edit the Makefile to make unpatched firmware, but it's not the goal of this project to support a la carte patching.

travisgoodspeed avatar Jan 25 '17 18:01 travisgoodspeed

Ok Travis , i understand , but the language inside dont change its only English , if write for example flash-es i mast have Spanish language inside or not ?

IK8JHL avatar Jan 25 '17 18:01 IK8JHL

Apologies, I was only testing Hungarian, and then only one word. 'make clean flash-es' ought to work now, though perhaps with bugs where strings are too long.

travisgoodspeed avatar Jan 25 '17 19:01 travisgoodspeed

The only language that i dont have tested ;-) Hi Hi .Now its all clear . I testing with Hungarian for now , i want test the max number of characters . .......i continue the work

IK8JHL avatar Jan 25 '17 19:01 IK8JHL

But reading in string.txt i view many translete words exceding lenght of words, example , maybe its not good

0xc544c 26 12 Message Send

en Message Send (12 OK) de SMS gesendet (12OK) es Mensaje enviado (15 no) it Mess.Inviato (12OK)

IK8JHL avatar Jan 25 '17 20:01 IK8JHL

Yes, these long strings will cause some trouble. We will need to abbreviate them.

travisgoodspeed avatar Jan 25 '17 21:01 travisgoodspeed

Ok when you are ready i can test italian , for correct lenght of words

IK8JHL avatar Jan 25 '17 21:01 IK8JHL

Could it be possible that those long strings cause merging of specific words in menu items?

To be precise, "Mensaje enviado" should be 12 chars long, whereas it's 15. So, could this string cause issues with, let's say, Serbian translation?

I'll attach screenshots when I get home from work :)

Thanks! 73

dragstor avatar Mar 07 '17 16:03 dragstor

Hi everybody! Would someone please tell me where am I wrong? In attachment the pic with my locales folder and the error with "make clean flash-it" command. Thanks in advance, Greg. P.S.: for those not speaking italian the error is "file not found". :)

error

IZ4FXC avatar Mar 14 '17 13:03 IZ4FXC

@IZ4FXC It looks like you don't have a C compiler installed in MinGW.

travisgoodspeed avatar Mar 14 '17 14:03 travisgoodspeed

Hi Travis,
  First of all thank you for your attention.
  This is my MinGW installation, is there anything missing?
  Greg.

Il 14/03/2017 15:30, Travis Goodspeed
  ha scritto:


  @IZ4FXC It looks like you don't have
    a C compiler installed in MinGW.
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.
  
    
      
      
    
    
  
  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/travisgoodspeed/md380tools","title":"travisgoodspeed/md380tools","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/travisgoodspeed/md380tools"}},"updates":{"snippets":[{"icon":"PERSON","message":"@travisgoodspeed in #656: @IZ4FXC It looks like you don't have a C compiler installed in MinGW."}],"action":{"name":"View Issue","url":"https://github.com/travisgoodspeed/md380tools/issues/656#issuecomment-286438600"}}}

IZ4FXC avatar Mar 14 '17 15:03 IZ4FXC

This is not a support forum. Please ask about the proper MinGW environment on the forum or the mailing list.

travisgoodspeed avatar Mar 14 '17 15:03 travisgoodspeed

I apologize, many thanks. :)
Gregorio De Michele

Assistenza informatica AUSL Modena V.le Martiri 56 41026 Pavullo N.F. (MO) tel. 0536 29247 cell. 320 2260953 Orari ufficio.

Il 14/03/2017 16:20, Travis Goodspeed
  ha scritto:


  This is not a support forum. Please ask about the proper MinGW
    environment on the forum or the mailing list.
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.
  
    
      
      
    
    
  
  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/travisgoodspeed/md380tools","title":"travisgoodspeed/md380tools","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/travisgoodspeed/md380tools"}},"updates":{"snippets":[{"icon":"PERSON","message":"@travisgoodspeed in #656: This is not a support forum. Please ask about the proper MinGW environment on the forum or the mailing list."}],"action":{"name":"View Issue","url":"https://github.com/travisgoodspeed/md380tools/issues/656#issuecomment-286454958"}}}

IZ4FXC avatar Mar 14 '17 15:03 IZ4FXC