Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7480 closed bug (fixed)

Mail preferences only partially localized

Reported by: taos Owned by: czeidler
Priority: normal Milestone: R1
Component: Preferences/Mail Version: R1/Development
Keywords: localization Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Using hrev41280 (gcc2hybrid).

Mail preflet is only partially localized. (For screenshots, I switched to Russian (cyrillic) to emphasize the missing parts.)

  • "Settings" tab is fully localized (not shown here).
  • "Accounts" tab is partially localized:

Partially localized "Accounts" tab.

"· Incoming", "· Outgoing", and "· E-mail filters" are prepared for translation in ConfigWindow.cpp. These strings appear on HTA and are also included in the respective catkeys. However, the translation is not used (maybe because of the bullet?).

  • "Incoming" settings are not localized at all.

"Incoming" settings missing localization.

  • "Outgoing" settings are not localized.

"Outgoing" settings missing localization.

  • "E-mail filters" settings are not localized.

"E-mail filters" settings missing localization.

A number of these strings is already prepared for translation by using B_TRANSLATE() in source code. AutoConfigView.cpp for example used to provide strings with context "E-Mail" at some point in the past (as evident in obsolete strings on HTA), but is currently missing "#include Locale.h" and an entry in the corresponding jamfile. FilterConfigView.cpp provides strings with context "Config Views" that were translated on HTA, but is also missing from jamfile. So, already translated strings never make it to the corresponding catkeys.

Attachments (6)

Account.png (25.4 KB) - added by taos 8 years ago.
Partially localized "Accounts" tab.
Incoming.png (35.5 KB) - added by taos 8 years ago.
"Incoming" settings missing localization.
Outgoing.png (29.5 KB) - added by taos 8 years ago.
"Outgoing" settings missing localization.
E-mail_filters.png (23.6 KB) - added by taos 8 years ago.
"E-mail filters" settings missing localization.
rdef_and_jamfiles.patch (9.2 KB) - added by taos 8 years ago.
Adds .rdef files (+ entries in the respective Jamfiles).
Mail_localization.patch (23.8 KB) - added by taos 8 years ago.
Adds localization for spam filter, removes space characters from translation strings (updated).

Download all attachments as: .zip

Change History (22)

Changed 8 years ago by taos

Attachment: Account.png added

Partially localized "Accounts" tab.

Changed 8 years ago by taos

Attachment: Incoming.png added

"Incoming" settings missing localization.

Changed 8 years ago by taos

Attachment: Outgoing.png added

"Outgoing" settings missing localization.

Changed 8 years ago by taos

Attachment: E-mail_filters.png added

"E-mail filters" settings missing localization.

comment:1 Changed 8 years ago by pulkomandy

Part of these are actually in the IMAP and SMTP add-ons. They need to be localized in different catalogs, because they don't have the preflet mime signature but another one.

comment:2 Changed 8 years ago by taos

Now, that the mail_daemon add-ons are localized (see Ticket #7689, hrev42293) the mail preflet should be fully localized, too. Unfortunately, with hrev42328 (compiled as @nightly-raw) the localization is still missing. The respective catalogs are there but are not used. Mail preferences as well as Mail menu in Deskbar are still not translated when switching languages in locale preflet. Is there anything else that must be changed before the catalogs are used?

comment:3 Changed 8 years ago by czeidler

shame on me but I'm quite unfamiliar with the local kit, pulkomandy probably knows more. You could take a look at the powerstatus app as far as I remember there have been similar problems... The PowerStatusView can live in the deskbar and in the app and there has been some problems.

comment:4 Changed 8 years ago by taos

Do we need *.rdef files for the add-ons? Seems adding those to disk_systems add-ons helped to fully localize DriveSetup (#5594).

comment:5 Changed 8 years ago by taos

Patch ("rdef_and_jamfiles.patch") added. Catalogs should now be used (at least, it works on my system - and we obviously need to make mail preferences aware of layout). I don't know what new .rdef files should look like so I used BFSAddOn.rdef as inspiration.

comment:6 Changed 8 years ago by taos

Has a Patch: set

comment:7 Changed 8 years ago by taos

Unfortunately, I introduced x-vnd.Haiku-mail_daemon for the catalogs when localizing mail_daemon. However, I didn't notice that there already was "application/x-vnd.Be-POST" in mail_daemon.rdef. The patch changes the catalog entry to x-vnd.Be-POST. I'm afraid that mail_daemon might have to be translated again on HTA, consequently.

Changed 8 years ago by taos

Attachment: rdef_and_jamfiles.patch added

Adds .rdef files (+ entries in the respective Jamfiles).

comment:8 Changed 8 years ago by czeidler

thanks!

- B_TRANSLATE("Fetching IMAP folders, have patience..."));
+ B_TRANSLATE("Fetching IMAP folders, have patience" B_UTF8_ELLIPSIS));

is this really a case for B_UTF8_ELLIPSIS?

x-vnd.Haiku-mail_daemon sounds better to me is there any backward compatibility issue? (outside of the haiku source?)

comment:9 Changed 8 years ago by axeld

Other mail applications could interact with the mail_daemon, and also want to start it when it's not running yet. I think there were examples of such applications out there, or else we would have changed the signature already.

comment:10 Changed 8 years ago by taos

I've added another patch ("Mail_localization.patch") to localize spam filter and to add a few missing strings for mail_daemon (+ add-ons) and mail preflet. As HTA removes space characters from beginning and end of a translated string (so that they can't be used by haiku) I tried to get rid of them (inspiration from mt's patch for #7689).

comment:11 Changed 8 years ago by pulkomandy

Please avoid hardcoding spaces like this. Some languages (eg. Chinese) don't use spaces at all, for them it make the whole thing look wrong without any way to fix it.

error_msg << B_TRANSLATE("Error while authenticating user") << " " << uid;

This makes it impossible :

  • To have no space before the uid in languages where it isn't needed
  • To do the right thing when a language needs something such as "Error while authenticating %uid% user".

Please use BString ReplaceFirst API instead for building strings from separate variables.

comment:12 Changed 8 years ago by taos

I'll add an updated patch in a few minutes to remove the hardcoded spaces. Could you please have a look at it (especially pop3.cpp and smtp.cpp) since I'm new to this?

Changed 8 years ago by taos

Attachment: Mail_localization.patch added

Adds localization for spam filter, removes space characters from translation strings (updated).

comment:13 Changed 8 years ago by pulkomandy

It's fine now. Thanks !

comment:14 Changed 8 years ago by czeidler

Resolution: fixed
Status: newclosed

thanks! next time please do a svn up first, there have been some clashes...

comment:15 in reply to:  14 Changed 8 years ago by taos

Replying to czeidler:

thanks! next time please do a svn up first, there have been some clashes...

Sorry, I trusted my script (1. svn update, 2. svn diff) to take care of this. Next time, I'll have a closer look at the reference revision. Oh, was the problem that I had two different reference revisions (hrev42339 and hrev42341) in the patch file?

Thanks for applying the patch despite the clashes!

comment:16 Changed 8 years ago by czeidler

oh don't know, actually just patch complained and when I checked the files everything was more or less fine...

Note: See TracTickets for help on using tickets.