Opened 13 years ago

Closed 13 years ago

#7804 closed enhancement (fixed)

[mail_daemon] Few missing localization strings

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 hrev42405 (gcc2hybrid).

Mail status window lacks localization for "Fetching/Sending mails for ..." and progress status when downloading mails.

This patch adds these localization strings as well as some minor cosmetic changes to have "· Incoming", "· Outgoing", and "· E-mail filters" in Mail preflet again indented (by using \t instead of space - I hope HTA accepts this).

TODO: In ConfigWindow.cpp, there are two similar (localized) strings - one lower-case "never" and one upper-case "Never" (see below for source code excerpts). However, on HTA (and consequently in catkeys and corresponding catalogs), there's only one string - the lower-case "never". Is this a known HTA bug?

	BPopUpMenu* frequencyPopUp = new BPopUpMenu(B_EMPTY_STRING);
	const char* frequencyStrings[] = {
		B_TRANSLATE("never"),
		B_TRANSLATE("minutes"),
		B_TRANSLATE("hours"),
		B_TRANSLATE("days")};
	BPopUpMenu *statusPopUp = new BPopUpMenu(B_EMPTY_STRING);
	const char *statusModes[] = {
		B_TRANSLATE("Never"),
		B_TRANSLATE("While sending"),
		B_TRANSLATE("While sending and receiving"),
		B_TRANSLATE("Always")};
	for (int32 i = 0; i < 4; i++) {
		BMessage* msg = new BMessage(kMsgShowStatusWindowChanged);
		BMenuItem* item = new BMenuItem(statusModes[i], msg);
		statusPopUp->AddItem(item);
		msg->AddInt32("ShowStatusWindow", i);
	}

Attachments (2)

E-mail.patch (3.3 KB ) - added by taos 13 years ago.
Adds missing localization to Mail status window + cosmetic changes in Mail preflet.
ConfigWindow.cpp.patch (814 bytes ) - added by taos 13 years ago.
Replacing B_TRANSLATE with B_TRANSLATE_COMMENT to better discern "never" and "Never".

Download all attachments as: .zip

Change History (10)

by taos, 13 years ago

Attachment: E-mail.patch added

Adds missing localization to Mail status window + cosmetic changes in Mail preflet.

comment:1 by taos, 13 years ago

patch: 01

comment:2 by taos, 13 years ago

If it's really a problem for HTA to have "never" and "Never" in a single catalog with exactly the same context, then a workaround could be to use B_TRANSLATE_COMMENT to make the strings more different: attached is a second patch (ConfigWindow.cpp.patch) that replaces B_TRANSLATE with B_TRANSLATE_COMMENT for "never"/"Never".

by taos, 13 years ago

Attachment: ConfigWindow.cpp.patch added

Replacing B_TRANSLATE with B_TRANSLATE_COMMENT to better discern "never" and "Never".

comment:3 by taos, 13 years ago

A similar problem with "Can't undo"/"Can't Undo" on HTA is mentioned in [40688].

comment:4 by czeidler, 13 years ago

Thanks, committed in hrev42426.

item = new AccountItem(B_TRANSLATE("\t\t· Incoming"), account, INBOUND_ITEM); 

I think it would be better to remove the menu dot (\t\t· ) form the translation, right? I would even put it into the AccountItem class into the constructor...

comment:5 by taos, 13 years ago

This might be the better solution (and also more flexible because the translation wouldn't break if some day the dot was exchanged for a bullet or another symbol or if the indentation was in/decreased). And there already are entries for "Incoming" and "Outgoing" on HTA :-)

comment:6 by taos, 13 years ago

BTW, in the following string (from StatusWindow.cpp), is the "kb" rather a "KiB"?

            sprintf(final, B_TRANSLATE("%.1f / %.1f kb (%d / %d messages)"), 

comment:7 by taos, 13 years ago

The never/Never issue seems solved with the B_TRANSLATE_COMMENT workaround (tested with Finnish localization on hrev42539 gcc2hybrid, catkeys for most other languages have not been imported from HTA, yet).

However, I've found some more strings that have already been localized in source code ("Unencrypted", "No encryption", "SSL", "STARTTLS") but are mising from catkeys. As this seems a more general problem, I opened a new ticket a few days ago: #7873 B_TRANSLATE("String") between #ifdef and #endif not included in catalogs.

Last edited 13 years ago by taos (previous) (diff)

comment:8 by pulkomandy, 13 years ago

Resolution: fixed
Status: newclosed

Patch applied, so closing ticket.

Note: See TracTickets for help on using tickets.