jun7 / rox-filer

ROX file manager
24 stars 6 forks source link

Can't translate some toolbar labels #155

Closed step- closed 7 years ago

step- commented 7 years ago

I created a Gettext .po file just for the toolbar labels. I compile it with msgfmt into a .mo file. When I run ROX-Filer with the .mo file installed and the correct LANG= value, all toolbar labels are translated as expected, except for the two labels that are initialized in toolbar.c like this:

144     {N_("Size┼"), GTK_STOCK_ZOOM_IN, N_("Change icon size\n"
184     {N_("○"), GTK_STOCK_SAVE, N_("Save Current Display Settings...\n"   

What do I need to do to be able to translate those two labels like the other ones?

Thank you

jun7 commented 7 years ago

"Size" is set by display.c - 631 "○": is set by filer.c - 4343 Ah "○"'s gettext is currently useless, would you change it?

jun7 commented 7 years ago

If you want check the initial strings of the toolbtn, it shows when toolbar options changed.

step- commented 7 years ago

"Size" is set by display.c - 631

and can't be localized. I don't know why, but I'm pretty sure I'm doing localization properly, because it works for all the other toolbar buttons, except for the two I mentioned.

Ah "○"'s gettext is currently useless, would you change it?

You're saying that the toolbar button shows strings (symbols) that aren't gettexted in the source code. Yes, I think you should gettext all the strings that are displayed in a button, even if those strings are symbols.

If you want check the initial strings of the toolbtn, it shows when toolbar options changed.

I'm not sure what you're saying, sorry. "Check the initial strings"... how?

jun7 commented 7 years ago

Did you even change gettext of display.c - 631?

I think you should gettext all the strings

Okey, I will fix it.

"the initial strings" are N("Size┼") and N("○"). They are over-written but only after changing toolbar option, they are not over-written.

step- commented 7 years ago

Yes, those are the strings that I translate in my .po file, but once it's compiled and installed the strings aren't translated.

msgid "Size┼" msgstr "test 1"

msgid "Size" msgstr "test 1.1"

msgid "○" msgstr "test 2"

jun7 commented 7 years ago

I get it. I will add _() to the "Size" and symbols.

jun7 commented 7 years ago

If you change the symbols, please make sure symbols' width are same width, if not, the toolbar's width is changed by when state is changed.

step- commented 7 years ago

OK, I can translate "Size" with build 7df6634. Thanks.

jun7 commented 7 years ago

Thank you for reporting.