]> git.wh0rd.org Git - tt-rss.git/commitdiff
Fix remaining plural forms to work with gettext.
authorTomas Chvatal <tchvatal@suse.cz>
Sun, 24 Mar 2013 12:32:03 +0000 (13:32 +0100)
committerTomas Chvatal <tchvatal@suse.cz>
Sun, 24 Mar 2013 12:32:03 +0000 (13:32 +0100)
js/viewfeed.js
plugins/digest/digest.js
plugins/import_export/import_export.js
plugins/import_export/init.php

index e32d3a990c9d8edb9c13c35aa87f4a2822c8f9b3..e3db58035da28c911e3027610ee664b7b84a211f 100644 (file)
@@ -979,9 +979,9 @@ function deleteSelection() {
                var str;
 
                if (getActiveFeedId() != 0) {
-                       str = __("Delete %d selected articles in %s?");
+                       str = ngettext("Delete %d selected article in %s?", "Delete %d selected articles in %s?" , rows.length);
                } else {
-                       str = __("Delete %d selected articles?");
+                       str = ngettext("Delete %d selected article?", "Delete %d selected articles?", rows.length);
                }
 
                str = str.replace("%d", rows.length);
@@ -1023,10 +1023,10 @@ function archiveSelection() {
                var op;
 
                if (getActiveFeedId() != 0) {
-                       str = __("Archive %d selected articles in %s?");
+                       str = ngettext("Archive %d selected article in %s?", "Archive %d selected articles in %s?", rows.length);
                        op = "archive";
                } else {
-                       str = __("Move %d archived articles back?");
+                       str = ngettext("Move %d archived article back?", "Move %d archived articles back?", rows.length);
                        op = "unarchive";
                }
 
@@ -1070,7 +1070,7 @@ function catchupSelection() {
 
                var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
 
-               var str = __("Mark %d selected articles in %s as read?");
+               var str = ngettext("Mark %d selected article in %s as read?", "Mark %d selected articles in %s as read?", rows.length);
 
                str = str.replace("%d", rows.length);
                str = str.replace("%s", fn);
@@ -1317,7 +1317,7 @@ function catchupRelativeToArticle(below, id) {
                if (ids_to_mark.length == 0) {
                        alert(__("No articles found to mark"));
                } else {
-                       var msg = __("Mark %d article(s) as read?").replace("%d", ids_to_mark.length);
+                       var msg = ngettext("Mark %d article as read?", "Mark %d articles as read?", ids_to_mark.length).replace("%d", ids_to_mark.length);
 
                        if (getInitParam("confirm_feed_catchup") != 1 || confirm(msg)) {
 
index 197847411a637b2af1f522c4e4da61b6523a2ce6..c8a08648cd05880a65de7891318300f56fef1b01 100644 (file)
@@ -68,7 +68,7 @@ function catchup_visible_articles(callback) {
 
                var ids = get_visible_article_ids();
 
-               if (confirm(__("Mark %d displayed articles as read?").replace("%d", ids.length))) {
+               if (confirm(ngettext("Mark %d displayed article as read?", "Mark %d displayed articles as read?", ids.length).replace("%d", ids.length))) {
 
                        var query = "?op=rpc&method=catchupSelected" +
                                "&cmode=0&ids=" + param_escape(ids);
@@ -515,7 +515,7 @@ function redraw_feedlist(feeds) {
                        $('feeds-content').innerHTML += "<li id='F-MORE-PROMPT'>" +
                                "<img src='images/blank_icon.gif'>" +
                                "<a href=\"#\" onclick=\"expand_feeds()\">" +
-                               __("%d more...").replace("%d", feeds.length-10) +
+                               ngettext("%d more...", "%d more...", feeds.length-10).replace("%d", feeds.length-10) +
                                "</a>" + "</li>";
                }
 
index b3b760f159d67a6753fd406b855919a040b2bfa4..86b0458be2b476d9858126c88af40bab9c517664 100644 (file)
@@ -37,7 +37,7 @@ function exportData() {
                                                                } else {
 
                                                                        $("export_status_message").innerHTML =
-                                                                               __("Finished, exported %d articles. You can download the data <a class='visibleLink' href='%u'>here</a>.")
+                                                                               ngettext("Finished, exported %d article. You can download the data <a class='visibleLink' href='%u'>here</a>.", "Finished, exported %d articles. You can download the data <a class='visibleLink' href='%u'>here</a>.", exported)
                                                                                .replace("%d", exported)
                                                                                .replace("%u", "backend.php?op=pluginhandler&plugin=import_export&subop=exportget");
 
index 61b9a439f5f3f57b4c2d52c92d72fef1bbbeac42..845245607ba92d0ceb07ce6b9336e6cbf8058b65 100644 (file)
@@ -382,8 +382,10 @@ class Import_Export extends Plugin implements IHandler {
                        }
 
                        print "<p>" .
-                               T_sprintf("Finished: %d articles processed, %d imported, %d feeds created.",
-                                       $num_processed, $num_imported, $num_feeds_created) .
+                               vsprintf(__("Finished: ")).
+                               vsprintf(ngettext("%d article processed, ", "%d articles processed, ", $num_processed), $num_processed).
+                               vsprintf(ngettext("%d imported, ", "%d imported, ", $num_imported), $num_imported).
+                               vsprintf(ngettext("%d feed created.", "%d feeds created.", $num_feeds_created), $num_feeds_created).
                                        "</p>";
 
                } else {