Opened 13 years ago
Closed 13 years ago
#7689 closed bug (fixed)
[mail_daemon] Mail menu in deskbar is not localized
Reported by: | taos | Owned by: | czeidler |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Servers/mail_daemon | Version: | R1/Development |
Keywords: | localization | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Using r1a3-rc-hrev42159.
There's no localization of mail menu in deskbar:
Not sure, but I think it is trunk/src/servers/mail/DeskbarView.cpp that should be localized. So far, MDR_DIALECT_CHOICE has been used. Is it possible to simply replace it by B_TRANSLATE?
Attachments (7)
Change History (25)
by , 13 years ago
Attachment: | Mail_Deskbar.png added |
---|
comment:1 by , 13 years ago
Yes exactly just replace the the MDR_DIALECT_CHOICE, to be sure to get all of them just remove this file: http://haiku.it.su.se:8180/source/xref/headers/private/mail/MDRLanguage.h
Would be cool to safe the Japanese translation at the same time.
Would really appreciate if you could do the switch to the haiku localization system!
comment:2 by , 13 years ago
Okay, so I tried to get rid of MDR_DIALECT_CHOICE. Here is a patch ("mail_daemon.patch") that replaces it with B_TRANSLATE and adds DoCatalogs to the Jamfile. The old Japanese translation from the source code is attached ("Old_Japanese_translation.txt").
Mail_daemon can be compiled without errors or warnings and works - as far as I can tell - as expected.
However, to make things easier for translators on HTA, I would like to use more complete strings (e.g. B_TRANSLATE("%d new messages for %s\n")
instead of fAlertString << numMessages << B_TRANSLATE(" new messages");
and fAlertString << B_TRANSLATE(" for ") << msg->FindString("name") << '\n';
. Unfortunately, I'm new to programming and don't know (yet) how to implement this correctly (more research needed).
comment:3 by , 13 years ago
patch: | 0 → 1 |
---|
comment:4 by , 13 years ago
Cool thanks the patch looks very good! Could you also localize the libmail.so and the add-ons/filters? Just delete the MDRLanguage.h file and you will see that there are some more places where the old macro is used.
comment:5 by , 13 years ago
Patches for libmail.so ("libmail.so.patch") and for mail_daemon add-ons and filters ("mail_daemon-addons.patch") added. MDRLanguage,h should no longer be needed.
EDIT: I uploaded the patches again. There was something wrong.
by , 13 years ago
Attachment: | Old_Japanese_translation.txt added |
---|
Old Japanese translation from source code (used with MDR_DIALECT_CHOICE).
by , 13 years ago
Attachment: | libmail.so.patch added |
---|
Patch to get rid of MDRLanguage.h for libmail.so.
comment:6 by , 13 years ago
Hmmm, after deleting MDRLanguage.h I can compile mail_daemon, libmail.so, and Mail separately with my patches. Unfortunately I get the following error when building the complete ggc2hybrid raw image:
...failed C++ /SVN/trunk/generated/objects/haiku/x86/release/add-ons/mail_daemon /inbound_protocols/pop3/ssl/pop3.o ...
What did I destroy???
comment:7 by , 13 years ago
Thanks for all your work so far! You can't compile the image anymore, since the mail_daemon has some add-ons which are also using the header. See src/add-ons/mail_daemon.
When I grep for MDRLang I get the following list:
./inbound_filters/match_header/ConfigView.cpp:#include <MDRLanguage.h> ./inbound_filters/notifier/ConfigView.cpp:#include <MDRLanguage.h> ./inbound_filters/notifier/filter.cpp:#include <MDRLanguage.h> ./inbound_protocols/imap/imap_config.cpp:#include <MDRLanguage.h> ./inbound_protocols/pop3/pop3.cpp:#include <MDRLanguage.h> ./outbound_filters/fortune/ConfigView.cpp:#include <MDRLanguage.h> ./outbound_protocols/smtp/ConfigView.cpp:#include <MDRLanguage.h> ./outbound_protocols/smtp/smtp.cpp:#include <MDRLanguage.h>
If you are interested in changing those, too, that would be really great!
comment:8 by , 13 years ago
Think thats fixed in the second bunch of patches. There have been also just some other smaller issues but it seems to compile now (still going on). will commit it soon...
comment:9 by , 13 years ago
I found a few typos (superfluous ", missing brackets...). I've uploaded the new version.
by , 13 years ago
Attachment: | mail_daemon-addons.patch added |
---|
Patch to get rid of MDRLanguage.h for mail_daemon add-ons, protocols, and filters.Patch to get rid of MDRLanguage.h for mail_daemon add-ons, protocols, and filters.
comment:10 by , 13 years ago
Ok thanks, but fixed it already by myself. Do you take care that the Japanese translation gets into HTA? thanks a lot!
follow-up: 14 comment:11 by , 13 years ago
I've already seen that I was too late with my updated patch. BTW, is it a problem that in src/add-ons/mail_daemon/inbound_protocols/imap/IMAPFolderConfig.cpp "..." is used instead of B_UTF8_ELLIPSIS)? I only noticed it when I was looking for typos for the updated patch.
I could try to put the Japanese translation into HTA. Unfortunately, I absolutely don't understand Japanese, so the results could get quite entertaining;-)
follow-up: 13 comment:12 by , 13 years ago
:) the Japanese guys should fix it then...
According to http://api.haiku-os.org/HIG/ch06s02.html B_UTF8_ELLIPSIS are only used when the button/menu item open another window.
comment:13 by , 13 years ago
Replying to czeidler:
According to http://api.haiku-os.org/HIG/ch06s02.html B_UTF8_ELLIPSIS are only used when the button/menu item open another window.
I would interpret the mentioned paragraph as: Only use … when and where appropriate but then make sure to use B_UTF8_ELLIPSIS instead of three single dots. Can't remember if HTA replaces three single dots (...) by the one-character UTF-8 symbol (…) when exporting catkeys.
follow-up: 15 comment:14 by , 13 years ago
Replying to taos:
I could try to put the Japanese translation into HTA. Unfortunately, I absolutely don't understand Japanese, so the results could get quite entertaining;-)
Hi, I will put Japanese translation to HTA, but HTA has not mail_daemon entry yet.
comment:15 by , 13 years ago
Replying to mt:
Hi, I will put Japanese translation to HTA, but HTA has not mail_daemon entry yet.
That would be great! Thanks. My attempts would probably end in disaster (maybe very amusing disaster - think of early attempts of automatic translation from Japanese to English and back)... It could take some time till the translation strings show up in HTA, however.
follow-up: 17 comment:16 by , 13 years ago
Hi, I have almost finished Japanese translation on HTA, but I can't translate some messages. so please apply these patches.
by , 13 years ago
Attachment: | MailDaemon.diff added |
---|
by , 13 years ago
Attachment: | notifier.diff added |
---|
comment:17 by , 13 years ago
Replying to mt:
Hi, I have almost finished Japanese translation on HTA, but I can't translate some messages. so please apply these patches.
That's what I was afraid of when I couldn't get rid of those separate translation chunks in favor of a more complete translation string. Now that I've had a little inspiration of how to do it, I'll have another look at those - I'm not sure if the spaces that are removed by HTA are re-added again when the catkeys are exported to SVN.
BTW, are there modern languages that still use a dual in addition to singular and plural forms (ancient Greek won't be a problem) or that use different cases when combined with numbers 2, 3, 4 etc (some Slavic languages maybe)? Then we would have to add entries for "2 new messages" or "3 new messages", d'oh, grammar...
comment:18 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
thanks guys! anybody keen to make the mail preferences layout aware? The preferences alone should be quite easy, when this is done one can take a look at the add-ons...
@mt: don't know maybe ask Oliver or Adrien...
Non-localized mail menu in deskbar.