make strings localizable; remove obsolete localized strings

This commit is contained in:
Myk Melez 2009-09-08 07:43:45 -07:00
Родитель 5bc7dd68fc
Коммит ddecab9f4a
7 изменённых файлов: 31 добавлений и 22 удалений

Просмотреть файл

@ -5,8 +5,8 @@
%globalDTD;
<!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
%notificationDTD;
<!--<!ENTITY % snowlNotificationDTD SYSTEM "chrome://snowl/locale/notification.dtd">-->
<!--%snowlNotificationDTD;-->
<!ENTITY % snowlNotificationDTD SYSTEM "chrome://snowl/locale/notification.dtd">
%snowlNotificationDTD;
<!ENTITY % feedDTD SYSTEM "chrome://browser/locale/feeds/subscribe.dtd">
%feedDTD;
]>
@ -29,8 +29,7 @@
oncommand="this.parentNode.parentNode._doButtonCommand(event);">
<xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image"/>
<xul:description anonid="messageText" class="messageText" xbl:inherits="xbl:text=label"/>
<!-- FIXME: localize it. -->
<xul:button label="Undo" anonid="undoButton" oncommand="document.getBindingParent(this).undo()"/>
<xul:button label="&undo.label;" anonid="undoButton" oncommand="document.getBindingParent(this).undo()"/>
<xul:spacer flex="1"/>
<xul:description anonid="subscribeUsingDescription"/>
<xul:menulist anonid="handlersMenuList" aria-labelledby="subscribeUsingDescription">

Просмотреть файл

@ -49,6 +49,7 @@ const Cu = Components.utils;
Cu.import("resource://snowl/modules/log4moz.js");
Cu.import("resource://snowl/modules/Observers.js");
Cu.import("resource://snowl/modules/Preferences.js");
Cu.import("resource://snowl/modules/StringBundle.js");
Cu.import("resource://snowl/modules/Sync.js");
Cu.import("resource://snowl/modules/URI.js");
@ -113,6 +114,11 @@ function getPrefReaderForType(t) {
let SnowlMessageView = {
get _strings() {
delete this._strings;
return this._strings =
new StringBundle("chrome://snowl/locale/river.properties");
},
get _log() {
delete this._log;
@ -591,8 +597,7 @@ let SnowlMessageView = {
this._periodLabel.setAttribute("value", this._point.toString("d"));
break;
case 1: // week
// FIXME: make this localizable.
// XXX show start and end dates instead of the week number?
// FIXME: show start and end dates instead of the week number.
this._periodLabel.setAttribute("value", this._point.toString("yyyy") +
" week " + this._point.getWeek());
break;
@ -940,6 +945,12 @@ let Sources = {
//**************************************************************************//
// Shortcuts
get _strings() {
delete this._strings;
return this._strings =
new StringBundle("chrome://snowl/locale/river.properties");
},
get _list() {
delete this._list;
return this._list = document.getElementById("sourcesList");
@ -1164,8 +1175,7 @@ dump("onMessageAdded: " + message + "\n");
let otherTabFeeds = this._getFeedsInOtherTabs();
if (otherTabFeeds.length > 0) {
let item = document.createElementNS(XUL_NS, "richlistitem");
// FIXME: make this localizable.
item.setAttribute("label", "Other Tabs");
item.setAttribute("label", this._strings.get("otherTabs"));
item.className = "header";
this._list.appendChild(item);
@ -1181,10 +1191,8 @@ dump("onMessageAdded: " + message + "\n");
}
let item = document.createElementNS(XUL_NS, "richlistitem");
// FIXME: make this localizable.
item.setAttribute("label", "Subscriptions");
// FIXME: make this localizable.
item.searchLabel = "Subscriptions";
item.setAttribute("label", this._strings.get("subscriptions"));
item.searchLabel = this._strings.get("subscriptions");
item.className = "header";
item.collection = new StorageCollection();
this._list.appendChild(item);
@ -1304,8 +1312,7 @@ dump("onMessageAdded: " + message + "\n");
_notifySubscribe: function(feed) {
let notificationBox = gBrowserWindow.getNotificationBox(window);
let notification = notificationBox.appendNotification(
// FIXME: localize it.
"You've subscribed to " + feed.name + " in Snowl!",
this._strings.get("subscribed", [feed.name]),
"snowlSubscribeFeed",
"chrome://snowl/content/icons/snowl-16.png",
notificationBox.PRIORITY_INFO_MEDIUM,

Просмотреть файл

@ -41,6 +41,8 @@
%globalDTD;
<!ENTITY % feedDTD SYSTEM "chrome://browser/locale/feeds/subscribe.dtd">
%feedDTD;
<!ENTITY % sourcesDTD SYSTEM "chrome://snowl/locale/sources.dtd">
%sourcesDTD;
]>
<bindings id="sourceBindings"
@ -127,8 +129,7 @@
<children/>
<xul:image class="star-button" xbl:inherits="starred=subscription"/>
</xul:hbox>
<!-- FIXME: localize it -->
<xul:label id="subscribeUsingDescription" value="Subscribe using:"/>
<xul:label id="subscribeUsingDescription" value="&subscribeUsing.label;"/>
<xul:menulist id="handlersMenuList" aria-labelledby="subscribeUsingDescription">
<xul:menupopup menugenerated="true" id="handlersMenuPopup">
<xul:menuitem id="liveBookmarksMenuItem" label="&feedLiveBookmarks;" class="menuitem-iconic" image="chrome://browser/skin/page-livemarks.png" selected="true"/>

Просмотреть файл

@ -11,13 +11,11 @@
# %2$S = link to the Creative Commons Attribution 2.5 License
# %3$S = link to the OPML Icon Project
# %4$S = link to the Creative Commons Attribution-Share Alike 2.5 License
#translators1 = Many thanks to the translators at %1$S.
contributors1 = Most icons are from the %1$S, licensed under a %2$S. The OPML icon is from %3$S, licensed under a %4$S.
#contributors2 = The OPML icon is from %1$S, licensed under a %2$S.
# XXX Should any of these be localized, or is it important to use their
# original names?
#babelzillaName = Babelzilla
silkIconSetName = Silk icon set by famfamfam
ccA25LicenseName = Creative Commons Attribution 2.5 License
opmlIconProjectName = OPML Icon Project
@ -28,7 +26,6 @@ ccASA25LicenseName = Creative Commons Attribution-Share Alike 2.5 License
# but they probably shouldn't be localized (unless perhaps the pages
# referenced have localized versions).
#babelzillaURL = http://www.babelzilla.org/
silkIconSetURL = http://www.famfamfam.com/lab/icons/silk/
ccA25LicenseURL = http://creativecommons.org/licenses/by/2.5/
opmlIconProjectURL = http://opmlicons.com/

Просмотреть файл

@ -0,0 +1 @@
<!ENTITY undo.label "Undo">

Просмотреть файл

@ -0,0 +1,6 @@
otherTabs=Other Tabs
subscriptions=Subscriptions
# LOCALIZATION NOTE:
# %1$S = the name of the feed
subscribed=You've subscribed to %1$S in Snowl!

Просмотреть файл

@ -1,3 +1 @@
<!ENTITY page.title "Snowl: Message Sources">
<!ENTITY nameCol.label "Name">
<!ENTITY closeButton.label "Close">
<!ENTITY subscribeUsing.label "Subscribe using:">