From 0e23b35b0ca3ac962b3c43f34cc865500305a69d Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Fri, 15 Oct 2004 21:10:29 +0000 Subject: [PATCH] Bug #257378 --> L10n teams should be able to translate reply header "on date" through *.properties file instead of using a hard coded string in mailnews.js sr=bienvenu --- .../compose/resources/locale/en-US/composeMsgs.properties | 5 +++++ mailnews/compose/src/nsMsgCompose.cpp | 2 +- mailnews/mailnews.js | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mailnews/compose/resources/locale/en-US/composeMsgs.properties b/mailnews/compose/resources/locale/en-US/composeMsgs.properties index 8d5b5d25ded..16a707e45b8 100644 --- a/mailnews/compose/resources/locale/en-US/composeMsgs.properties +++ b/mailnews/compose/resources/locale/en-US/composeMsgs.properties @@ -301,6 +301,11 @@ sendMessageCheckSendButtonLabel=Send ## wrote: mailnews.reply_header_authorwrote=%s wrote +## reply header in composeMsg +## wrote: +mailnews.reply_header_authorwrote=%s wrote +mailnews.reply_header_ondate=On %s + ## reply header in composeMsg ## user specified mailnews.reply_header_originalmessage=-------- Original Message -------- diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index 9e8a03983d1..f8195a6b9c9 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -147,7 +147,7 @@ static nsresult GetReplyHeaderInfo(PRInt32* reply_header_type, if (NS_FAILED(rv) || !*reply_header_authorwrote) *reply_header_authorwrote = nsCRT::strdup(NS_LITERAL_STRING("%s wrote").get()); - rv = prefs->CopyUnicharPref("mailnews.reply_header_ondate", reply_header_ondate); + rv = prefs->GetLocalizedUnicharPref("mailnews.reply_header_ondate", reply_header_ondate); if (NS_FAILED(rv) || !*reply_header_ondate) *reply_header_ondate = nsCRT::strdup(NS_LITERAL_STRING("On %s").get()); diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js index eff44522999..dacea380a1a 100644 --- a/mailnews/mailnews.js +++ b/mailnews/mailnews.js @@ -187,7 +187,8 @@ pref("mailnews.reply_header_type", 1); // locale which affects date format, set empty string to use application default locale pref("mailnews.reply_header_locale", ""); pref("mailnews.reply_header_authorwrote", "chrome://messenger/locale/messengercompose/composeMsgs.properties"); -pref("mailnews.reply_header_ondate", "On %s"); +pref("mailnews.reply_header_ondate", "chrome://messenger/locale/messengercompose/composeMsgs.properties"); + // separator to separate between date and author pref("mailnews.reply_header_separator", ", "); pref("mailnews.reply_header_colon", ":");