Emerald Editor Discussion
March 27, 2017, 01:34:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Translatng Crimson Editor  (Read 30983 times)
0 Members and 1 Guest are viewing this topic.
gialloporpora
Translators
Miner
***
Posts: 19



« on: October 31, 2009, 05:48:15 pm »

Dear all,
I have joined to forum to ask if where I could download files to translate Crimson Editor (Emerald Editor) in my language ?
Is it possible to do this ?
Thanks
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #1 on: November 01, 2009, 03:42:21 am »

Hello, I'm not sure how exactly that would work, but it should definitely be possible to translate Crimson Editor. Most of the English should be in the res\cedt_us.rc file. What you could do is open that file in a text editor and manually translate all strings (just what is between quotation marks) to your language. Once you do that, one of the developers could work on getting your translation integrated.

Do you have Visual Studio Professional? It is not necessary, but it may make things easier for you.

Also, out of curiosity, what is your language?

I attached the file, but you can always get it from the SVN repository if you need the latest version.

Phil

Edit: Removed the file since it is out of date now. The latest can be downloaded from http://svn.emeraldeditor.com/viewvc.cgi/CrimsonEditor/trunk/res/cedt_us.rc?view=co.
« Last Edit: November 03, 2009, 03:55:54 am by Phil » Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #2 on: November 01, 2009, 01:05:38 pm »

Thank you very much  for your help :-)
Now I  download the file and I try to translate it in italian, that is my native language.
Sandro

Edit: I have  had a quick look to the file and I seem that it must be compiled to  be effective.
I don't have a C++ compiler and I could not test my translation.

To not make too errors modifying the file, I have a little question.
I have these two string for "File -> New" item:
Code:
MENUITEM "&New\tCtrl+N",                ID_FILE_NEW

and:

Code:
MENUITEM "&New",                        ID_FILE_NEW

I think - but I am not sure - that only the second line must be translated.  Is this true or I need to translate all lines ?
The "&" what means ? Is it related to the accesskey ?
« Last Edit: November 01, 2009, 01:45:35 pm by gialloporpora » Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #3 on: November 01, 2009, 10:19:56 pm »

Unfortunately, we don't have a system set up where you can translate without compiling. I can work with you to help you if you need a custom build, just PM me. With "&New\tCtrl+N", I think this needs translated too. The \t means a tab and the & tells Windows to use the next letter for a keyboard shortcut when you access the menus with the Alt key. So, if Ctrl is still called Ctrl on Italian keyboards, you might say something like "&Nuevo\tCtrl+N" as the translation. (That's Spanish; I don't know any Italian.)

The program will continue to use Ctrl+N as the shortcut regardless of what you put there, but you can control the key for using Alt to navigate menus. If you wanted to use v for New in the menu, you could do "Nue&vo\tCtrl+N".

Hope this helps,
Phil
Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #4 on: November 02, 2009, 12:40:32 am »

Thank you very  much, Phil, for your explanation, I have understand. In this week I'll try to translate the file in italian.  I hope  that my HD not expire in this days, it have some problems and I'll change it, but before I'll try to translate the file.
In italian CTRL  is CTRL, luckily for me, all modifiers are the same (except SHIFT -> Maiusc.), New ie  "Nuovo".
Unfortunatelly, I have seen that in same menu, string are very short (Conf user tool) is abbreviated, and in italian  usaually, string are longer than original english, english is more coincise.
Thanks
Sandro



Edit: I see  that  there are duplicate strings:
Line n. 163
Code:
MENUITEM "&Nuovo\tCtrl+N",                ID_FILE_NEW
and line n.  298:
Code:
MENUITEM "&NNuovo\tCtrl+N",                ID_FILE_NEW

Sorry for all this question, but I don't know, it the first time that I translate a file with this syntax and I don't want to make mistakes.
« Last Edit: November 02, 2009, 02:31:27 am by gialloporpora » Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #5 on: November 03, 2009, 03:54:50 am »

The menu should automatically expand to hold a longer string.

Thanks for pointing out the duplication in the menus. I updated the file to remove one of them. You can always download the latest version of the file from http://svn.emeraldeditor.com/viewvc.cgi/CrimsonEditor/trunk/res/cedt_us.rc?view=co.

Don't worry about asking questions.
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #6 on: November 06, 2009, 10:47:57 pm »

You are now a member of the new Translators group. Congratulations. You now get 3 large emeralds under your name, and you have access to the hidden board named File Store.
Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #7 on: November 07, 2009, 01:36:51 pm »

Ok, Phil, thank for the build!
Now I have seen that I have not problem with menu entries but only with buttons, for example in the Search dialog box "Find next" button became "Trova successivo" that is too long and is  cutted, I think to remove the "next" part, I translate it like "Trova" (find) . Or, if possible, I could enlarge the dialog box, but I don't know if this is possible

I have a question about accesskey (&): in Firefox they must be unique for any menu, not duplication, in other Windows software they are always the first letter,  what convention I must follow ?

I prefere that they are unique, but in this case, they should be underlined to easly  recognize them, and I have seen that they are not underlined  in menu.

Sandro

Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #8 on: November 08, 2009, 01:47:18 am »

It is possible to expand buttons in your file, but it is not easy without access to Visual Studio. Here is the code for the find next button in the find dialog:

Code:
    DEFPUSHBUTTON   "Trova &successivo",IDC_FIND,229,7,50,14,WS_GROUP

I think those numbers after IDC_FIND are the left, top, width, and height of the button. So if you changed 50 to 100, the button would be twice as wide. You would also want to change the width of the whole window and the cancel button to be 50 wider too if you did this. In Visual Studio, you can do this visually without looking at the code.

The access keys don't have to be unique or the first letter. If there are multiple items with the same letter, pressing that letter will cycle through the items with that letter. To see the underlines, press the Alt key. For example, for File->Nuovo, press Alt then F then N, or press Alt+F then N.
Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #9 on: November 09, 2009, 12:37:29 am »

OK, Phil, thanks for your clarification.
I have installed Visual C++, but I don't know how to use it, sorry. I have tried to open the RC file, but I think that I must download the whole code to modify it, this week I try to learn how to do that.

For the moment I have fixed error in translation, I hope to complete it in next days, I think to have translated the 80%  of strings.

Sandro
« Last Edit: November 09, 2009, 12:45:19 am by gialloporpora » Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #10 on: November 09, 2009, 02:22:18 pm »

Unfortunately, if you installed Visual C++ Express Edition, that will not work. You have to buy Standard Edition or better to get the behavior I described. I wouldn't recommend buying it only for CE unless you have lots of money. I was able to buy Professional Edition for a steeply discounted price from my college when I graduated; that's why I have it.
Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #11 on: November 10, 2009, 10:16:46 am »

Ok, thank
I was hoping you could do with the Express version :-(. No, I have no idea to buy Visual C++ :-)

These strings need to be translated or not ?
Code:
CTEXT           "keyword8",IDC_KEYWORD8_COLOR,207,634,61,11,SS_NOTIFY | WS_TABSTOP,WS_EX_DLGMODALFRAME | WS_EX_TRANSPARENT
MENUITEM "User Tools",                  ID_COMMAND_USER_FILE0, GRAYED
MENUITEM "Recent File",                 ID_FILE_MRU_FILE1, GRAYED
PUSHBUTTON      "Button1",IDC_FIND_STRING_MENU,206,7,12,12,BS_ICON
CONTROL         "Tab1",IDC_FILE_TAB,"SysTabControl32",TCS_FOCUSNEVER,0,1,169,18
RTEXT           "separator",IDC_SEPARATOR,7,103,127,8
CTEXT           "range1 bkgr",IDC_RANGE1_BKGR_COLOR,207,686,61,11,SS_NOTIFY | WS_TABSTOP,WS_EX_DLGMODALFRAME | WS_EX_TRANSPARENT

I have not translated them, because I am not sure.

In "Document -> Syntax Type" accesskey are missing:
Code:
IDS_CONF_SYNTAX_TYPE7   "Java Program|JAVA.SPC|JAVA.KEY"
I do not know if it is an oversight or if it is desired, I must add "&" to these strings ?
If yes, I could add them also to the original file.






Edit:

Ok, I have translated all strings (except some strings that I am not sure if  they must be translated (see above)
http://github.com/gialloporpora/Emerald-Editor-in-italian/raw/master/cedt_it.rc

Now, if you can make another build I could check  errors (in particular strings that are too long in button or dialog windows).

I have made a little script to translate strings and replacing them automatically in the RC file:
http://github.com/gialloporpora/Emerald-Editor-in-italian
in this way, if the file is updated, I simply translate new strings.
All strings that I have translated are in cedt_it.txt file, in cedt2_it.txt there are strings that I don't know if they must be translated, in rejected.txt all other strings that I am almost sure they should not be translated.



« Last Edit: November 10, 2009, 04:11:38 pm by gialloporpora » Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #12 on: November 10, 2009, 06:42:14 pm »

These strings need to be translated or not ?
Code:
CTEXT           "keyword8",IDC_KEYWORD8_COLOR,207,634,61,11,SS_NOTIFY | WS_TABSTOP,WS_EX_DLGMODALFRAME | WS_EX_TRANSPARENT
MENUITEM "User Tools",                  ID_COMMAND_USER_FILE0, GRAYED
MENUITEM "Recent File",                 ID_FILE_MRU_FILE1, GRAYED
PUSHBUTTON      "Button1",IDC_FIND_STRING_MENU,206,7,12,12,BS_ICON
CONTROL         "Tab1",IDC_FILE_TAB,"SysTabControl32",TCS_FOCUSNEVER,0,1,169,18
RTEXT           "separator",IDC_SEPARATOR,7,103,127,8
CTEXT           "range1 bkgr",IDC_RANGE1_BKGR_COLOR,207,686,61,11,SS_NOTIFY | WS_TABSTOP,WS_EX_DLGMODALFRAME | WS_EX_TRANSPARENT


I'm not sure. I am guessing that Button1, Tab1, and separator don't need to be translated, but the others do. That is just a guess though. "keyword8" and "range1 bkgr" might be in the color preferences. (bkgr is background in case you didn't know.) When I give you the updated build, you can look around to see if these strings show up anywhere.

In "Document -> Syntax Type" accesskey are missing:
Code:
IDS_CONF_SYNTAX_TYPE7   "Java Program|JAVA.SPC|JAVA.KEY"
I do not know if it is an oversight or if it is desired, I must add "&" to these strings ?
If yes, I could add them also to the original file.

This is probably an oversight. However, if the & is missing, I think the access key defaults to the first letter. It probably wouldn't hurt to add the &'s though.

I have made a little script to translate strings and replacing them automatically in the RC file:
http://github.com/gialloporpora/Emerald-Editor-in-italian
in this way, if the file is updated, I simply translate new strings.
All strings that I have translated are in cedt_it.txt file, in cedt2_it.txt there are strings that I don't know if they must be translated, in rejected.txt all other strings that I am almost sure they should not be translated.

That sounds like a system that could be useful for translations to other languages too. If you like, I could create a translation folder in our SVN server to hold your tool.

I'll post a new build on the File Store forum shortly.
Phil
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #13 on: November 10, 2009, 07:06:51 pm »

This one didn't work quite as well. I'm trying to find out what the problem is.

One issue I have seen is with the IDD_ASK_REPLACE_DIALOG section. This dialog shows up when you set up a replace, then click "find next". It just shows the string "Replace? (Yes/No/All/Once/Stop)" and the user can press Y,N,A,O, or S, which are access keys for the other buttons which are hidden. With this design, the translations for Yes, No, Once, Stop, and All, have to all have different access keys, and since the user can't see underlines here, the access keys should probably be the first letter. So I don't know if it's easy to do in Italian, but it would be good if you could translate Yes, No, All, Once, and Stop so they all start with a different letter. If you can't manage that, you could possibly try something like "Replace? 1:Yes 2:No 3:All 4:Once 5:Stop" and make the access keys of the hidden buttons be numbers.

Does this make sense?
Logged
gialloporpora
Translators
Miner
***
Posts: 19



« Reply #14 on: November 10, 2009, 07:33:16 pm »

"Yes/No/All/Stop" were translated with accesskey:

Quote
PUSHBUTTON      "&Stop",IDCANCEL,92,2,20,9,NOT WS_VISIBLE | NOT WS_TABSTOP
PUSHBUTTON      "&Si",IDYES,2,2,20,9,NOT WS_VISIBLE | NOT WS_TABSTOP
PUSHBUTTON      "&No",IDNO,24,2,20,9,NOT WS_VISIBLE | NOT WS_TABSTOP
PUSHBUTTON      "&Tutte",ID_ALL,47,2,20,9,NOT WS_VISIBLE | NOT WS_TABSTOP

In the previous file the "separator" was tanslated in "separatore", is it possible that this is the problem? Sorry, I had translated it before reading your answer



Now I have updated the file.


If you want to include the script, you can make you wish :-).  It require Python to run.
But I think that I need to improove it, if I undestand exactlly what are the strings to translate is better, for the moment it works but  it is not perfect.
Edit: maybe, also this string should no be translated:
"Pulsante1" -> "Button1"


« Last Edit: November 10, 2009, 07:49:05 pm by gialloporpora » Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.126 seconds with 18 queries.