Browse Source

fix pluralizations

master
Msjoinder 11 years ago
parent
commit
239e14f572
  1. 8
      interface_common.js
  2. 10
      interface_localization.js
  3. 2
      twister_actions.js

8
interface_common.js

@ -71,16 +71,16 @@ function timeSincePost(t) {
var t_delta = Math.ceil((now - d) / 1000); var t_delta = Math.ceil((now - d) / 1000);
var expression = ""; var expression = "";
if(t_delta < 60) { if(t_delta < 60) {
expression = polyglot.t("seconds", { seconds: t_delta }); expression = polyglot.t("seconds", t_delta);
} }
else if(t_delta < 60 * 60) { else if(t_delta < 60 * 60) {
expression = polyglot.t("minutes", { minutes: Math.floor(t_delta/60) }); expression = polyglot.t("minutes", Math.floor(t_delta/60));
} }
else if(t_delta < 24 * 60 * 60) { else if(t_delta < 24 * 60 * 60) {
expression = polyglot.t("hours", { hours: Math.floor(t_delta/60/60) }); expression = polyglot.t("hours", Math.floor(t_delta/60/60));
} }
else { else {
expression = polyglot.t("days", { days: Math.floor(t_delta/24/60/60) }); expression = polyglot.t("days", Math.floor(t_delta/24/60/60));
} }
return polyglot.t("time_ago", { time: expression }); return polyglot.t("time_ago", { time: expression });
} }

10
interface_localization.js

@ -45,7 +45,7 @@ if(preferredLanguage == "en"){
"Configure block generation": "Configure block generation", "Configure block generation": "Configure block generation",
"Connections:": "Connections: ", // to network "Connections:": "Connections: ", // to network
"Connection lost.": "Connection lost.", "Connection lost.": "Connection lost.",
"days": "%{days} day |||| %{days} days", "days": "%{smart_count} day |||| %{smart_count} days",
"Detailed information": "Detailed information", "Detailed information": "Detailed information",
"DHT network down.": "DHT network down.", "DHT network down.": "DHT network down.",
"Direct Messages": "Direct Messages", "Direct Messages": "Direct Messages",
@ -74,19 +74,19 @@ if(preferredLanguage == "en"){
"General information": "General information", "General information": "General information",
"Generate blocks (send promoted messages)": "Generate blocks (send promoted messages)", "Generate blocks (send promoted messages)": "Generate blocks (send promoted messages)",
"Home": "Home", // homepage "Home": "Home", // homepage
"hours": "%{hours} hour |||| %{hours} hours", "hours": "%{smart_count} hour |||| %{smart_count} hours",
"Internal error: lastPostId unknown (following yourself may fix!)": "Internal error: lastPostId unknown (following yourself may fix!)", "Internal error: lastPostId unknown (following yourself may fix!)": "Internal error: lastPostId unknown (following yourself may fix!)",
"Known peers:": "Known peers: ", "Known peers:": "Known peers: ",
"Last block is ahead of your computer time, check your clock.": "Last block is ahead of your computer time, check your clock.", "Last block is ahead of your computer time, check your clock.": "Last block is ahead of your computer time, check your clock.",
"mentions_at": "Mentions @%{user}", "mentions_at": "Mentions @%{user}",
"minutes": "%{minutes} minute |||| %{minutes} minutes", "minutes": "%{smart_count} minute |||| %{smart_count} minutes",
"Must be 16 characters or less.": "Must be 16 characters or less.", // username "Must be 16 characters or less.": "Must be 16 characters or less.", // username
"Network": "Network", "Network": "Network",
"Network config": "Network config", "Network config": "Network config",
"Network status": "Network status", "Network status": "Network status",
"New direct message...": "New direct message...", "New direct message...": "New direct message...",
"New Post...": "New Post...", "New Post...": "New Post...",
"new_posts": "%{count} new post |||| %{count} new posts", "new_posts": "%{smart_count} new post |||| %{smart_count} new posts",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Not available", // username is not available "Not available": "Not available", // username is not available
"Number of blocks in block chain:": "Number of blocks in block chain: ", "Number of blocks in block chain:": "Number of blocks in block chain: ",
@ -110,7 +110,7 @@ if(preferredLanguage == "en"){
"Retransmits": "Retransmits", "Retransmits": "Retransmits",
"Retransmitted by": "Retransmitted by", "Retransmitted by": "Retransmitted by",
"search": "search", "search": "search",
"seconds": "%{seconds} second |||| %{seconds} seconds", "seconds": "%{smart_count} second |||| %{smart_count} seconds",
"send": "send", "send": "send",
"Send post with username": "Send post with username ", "Send post with username": "Send post with username ",
"Sent Direct Message": "Sent Direct Message", "Sent Direct Message": "Sent Direct Message",

2
twister_actions.js

@ -214,7 +214,7 @@ function processHashtag(postboard, hashtag, data) {
displayHashtagPending(postboard); displayHashtagPending(postboard);
} else { } else {
var newTweetsBar = postboard.closest("div").find(".postboard-news"); var newTweetsBar = postboard.closest("div").find(".postboard-news");
newTweetsBar.text(polyglot.t("new_posts", { count: _hashtagPendingPosts.length })); newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
newTweetsBar.fadeIn("slow"); newTweetsBar.fadeIn("slow");
} }
} }

Loading…
Cancel
Save