i18n support

Bug #311482 reported by Steven Sheehy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LinuxDC++
Fix Released
High
Steven Sheehy

Bug Description

Berlios Feature Request #3400: gettext for translators
https://developer.berlios.de/feature/index.php?func=detailfeature&feature_id=3400&group_id=2230

Add support for multiple languages. Once 0.707 core is merged, this will be possible.

Tags: i18n ui

Related branches

Changed in linuxdcpp:
importance: Undecided → High
status: New → Confirmed
Changed in linuxdcpp:
assignee: nobody → individ
Revision history for this message
3ED (krzysztof1987) wrote :

Thanks. Now, linuxdc++ supported multi-languages. This is my beta translation gui.

Revision history for this message
3ED (krzysztof1987) wrote :

I used xgettext to create a new pot from glade files rev. 278. Files from ../dcpp/po/.. are poor. Many of dialogs or texts are not translatable (like: "Upload finished, idle"), ltd, please fix it.

Revision history for this message
qwertitis (qwertitis-deactivatedaccount) wrote :

2 notices to all translators:

1) The current i18n branch is work-in-progress and the msgids are subject to change at my whim. I can and I will change msgids if I think it would improve translations or user experience. This is normal and recommended practice even for stable software. I'm giving you a warning since you would essentially be working on a moving target. This is not necessary a bad thing, it means that I'm open to suggestions too.

2) I recommend not to alter the dcpp/po/ files (even though they might be poor translations). They are pulled from upstream, and are maintained by upstream. This means that you'll have to contribute to DC++ directly to change these files. DC++ uses launchpad translations, where this dcpp directory is translated separately.

3ED: You are not extracting msgids properly. See the i18n.sh script.

I'm responding to bug mail, but I will not work with this until the start of February. I hope I will get some free time by then.

Revision history for this message
3ED (krzysztof1987) wrote :

File from ../po/.. translating nothing (0% of dialogs). Where is i18n.sh?
# find -name "*i18n*" | wc -l
# 0
I been use 'xgettext *' like at gnu pages and like I used this before.. (sorry, but I forget about msginit)
BTW. In DC++ files are XML which is ugly.. This is not KISS.. :>

>The current i18n branch is work-in-progress and the msgids are subject to change at my whim. I can
>and I will change msgids if I think it would improve translations or user experience.

I know. I put some comments in my file ltd.. ( "Total size: *0B*" :o ) Dialogs which not _prints in polish.. :)
BTW. When can we expect stable release?

3ED :>

Revision history for this message
3ED (krzysztof1987) wrote :
Revision history for this message
3ED (krzysztof1987) wrote :

OK, I created pot in i18n.sh and I merged my old po files.. Now, more is in polish.
New version: http://aur.archlinux.org/packages.php?ID=22586

3ED, havy nice day.

Revision history for this message
3ED (krzysztof1987) wrote :

Attention: File matched to rev 287 - "linuxdcpp.pl.po" and "libdcpp.pl.po" - few dilaogs more in pol:
http://aur.archlinux.org/packages.php?ID=22766

Previsly verion work with: core0707+experimental rev. 278 (~razzloss/linuxdcpp/0707-core).

3ED. ;]

Changed in linuxdcpp:
milestone: none → 1.1.0
tags: added: i18n
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

i18n branch merged into trunk. Please test and let us know of any issues.

Changed in linuxdcpp:
assignee: nobody → Steven Sheehy (steven-sheehy)
status: Confirmed → Fix Committed
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

I've imported the translation template into Launchpad (https://translations.launchpad.net/linuxdcpp). It's set for continuous automatic update from the trunk. Please start uploading those translations to your language of choice. Razzloss, get that Finnish translation going. I've already completed my English translation. :D

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

I noticed some translated strings did not have an underline (or '_') character to allow for mnemonic acceleration keys. I've added some notes to potential translators in Readme.txt that should help clarify the translation guidelines. There doesn't seem to be any way to add these to the translations page, so I'm pasting the guidelines here as well in the hope that more people see them:

Translating:
------------
To help translate LinuxDC++, visit our translations page on Launchpad at
https://translations.launchpad.net/linuxdcpp. When adding translations for
your language, there are a few guidelines to be aware of. This project uses
boost for its string formatting, so in some strings you will see %1%, %2%, etc.
format specifiers. These indicate the order of the variable in the original
string and are used in case translators need to reorder the variables for their
locale.

Some strings from glade files use special Pango text markup that should not be
removed or modified. For example, in the string "<b>Auto-Drop</b>" the <b> and
</b> is a special Pango markup that indicates the text within should be bold and
thus only the text 'Auto-Drop' should be translated.

Another important note is that some strings contain a '_' or underline character
that indicates the character directly after it is a mnemonic accelerator key.
This means that users can use the keyboard to directly focus that item by
pressing ALT and the mnemonic accelerator key associated with that item. For
example, if the string is "Default _hub encoding:" then 'h' is the mnemonic
accelerator key and can be accessed by pressing ALT+h when that item is
displayed in the GUI. Please try to make sure that all strings that contain a
underline in the English msgid string also contain a corresponding underline in
the translated string.

Another important note with the mnemonic accelerator key is to try to make the
mnemonic accelerator key chosen unique for the part of the GUI in which the
string is displayed, as best as you possibly can. For example, if you have
"_Download Queue" and "Finished _Downloads" both visible in the GUI, then
when the user presses ALT+D it is ambiguous as to which they will select
first since they have the same accelerator key. They may have to press the key
repeatedly to focus on their intended item. Proper use of the mnemonic
accelerator key will help keep LinuxDC++ accessible to people with disabilities
and help speed up navigation for advanced users.

Revision history for this message
Razzloss (razzloss) wrote :

For finnish translation: I doubt I'm qualified to do it. Haven't used a localized system in years (>15). So I'll leave it to someone else who knows the right terms.

2nd. I still don't think that the chat commands should be translated (/fav /search, etc.). Or at least it should accept the english versions as well.
1) Many hubs include some instructions in their MOTDs (mainly how to add it to favorites with /fav). If we only accept the localized version this no longer works. Though not critical, if only used for /fav, but still.
2) DC++ doesn't do it.
3) Really, really think it is a bad idea.

--RZ

Revision history for this message
3ED (krzysztof1987) wrote :

I think that same as Razzloss..

additional:
1) "/userlist" = "/lista plików" (space between?)

I won't translate it.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Razzloss, I was just joking about the Finnish translation...

About the chat commands, I'm okay if you want to un-translate them.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

One small thing I noticed is that the preferences dialog takes quite a bit longer now to open due to the translations. Can anyone else confirm? I'm guessing this has to do with boost formatting and not with the actual gettext lookups which should be pretty fast. In designing this, I tried to figure out a way to have positional arguments and formatting without using boost since I figured this was going to happen but there wasn't really any other good approaches.

Revision history for this message
poyZONE (verzisor) wrote :

Hello. I wanna translate it in Romanian language. Can someone make a little guide of what to download, what to translate, where to go? Would be very usefull for beginners like me.

Revision history for this message
3ED (krzysztof1987) wrote :

This is your first translation?

- Get pot from lauchpad (there is few tags without upload will not be posible)
- Put plural for your language
- Translate
- Upload to launchpad and correct

If you wanna check your tanslation:
somting like that: msgfmt lang.po -o /usr/share/locales/lang/LC_MESSGAE/linuxdcpp.mo

Plural forms: http://translate.sourceforge.net/wiki/l10n/pluralforms
Good po-editor: poedit

Try to do unique mnemonic for the menu

Revision history for this message
3ED (krzysztof1987) wrote :

ah, and unique in windows

imho: launchpad translation page slow down translation but maybe you want.. :)

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

poyZONE, I made such a guide already and mentioned it in comment #10 of this thread. You can also find it in the Readme.txt included with the code. I think for people new to translating that it is easier to use the launchpad translation page (https://translations.launchpad.net/linuxdcpp) than the method 3ED mentioned. At the top of the translations page for a particular language Launchpad provides additional links to documentation on translating that can help as well.

Revision history for this message
3ED (krzysztof1987) wrote :

- launchpad have slow "save & continue" (2-20s)
- I must use mail to download "po/mo" for preview (few minuts)

I not have linuxdc++ window which I touch in live at lauchpad and in poedit too, but poedit is much faster and I always have msgfmt close

I change a lot after uploading at launchpad but this was mnemonic, untranslated strings or language things like grammar, make short string.

Check and chose.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

If you're working from source code you don't need to run msgfmt, you can just runs scons and it will convert any po/*.po to *.mo and place in build/locale directory. If you then run scons install it will install the *.mo to your prefix. If you're using binaries then of course you will have to use msgfmt.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Can someone let me know if translations show up automatically in the latest PPA version? I've made it so that translations from Launchpad automatically get exported and built into the PPA now.

Revision history for this message
Sergey Basalaev (sbasalaev) wrote :

Yep, I've installed from PPA and it showed to me in Russian... pretty bad Russian to be honest. I've almost totally retranslated it. You should change translation permissions from Open to Structured. You can also make an announcement in <email address hidden>, that will result in a burst of translations.

Changed in linuxdcpp:
status: Fix Committed → Fix Released
tags: added: ui
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

We would appreciate it if any translators would join our new linuxdcpp-contributors team so we can keep them better notified of upcoming releases, changes, etc. Please read our announcement for more details:

https://launchpad.net/linuxdcpp/+announcements

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Of course, anyone who's interested in linuxdcpp development can join not just translators.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.