Add Zotero.Utilities.Internal.stringWithColon() for localized colons
Generally just a colon, but, e.g., French adds a space before it. We'll want to replace uses of `punctuation.colon` with this.
This commit is contained in:
parent
70f9462913
commit
159c112257
2 changed files with 13 additions and 0 deletions
|
@ -1561,6 +1561,18 @@ Zotero.Utilities.Internal = {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a localized colon to a string (which is usually just a colon, but, e.g., in French
|
||||||
|
* there's a space before it)
|
||||||
|
*
|
||||||
|
* @param {String}
|
||||||
|
* @return {String}
|
||||||
|
*/
|
||||||
|
stringWithColon: function (str) {
|
||||||
|
return Zotero.getString('punctuation.colon.withString', str);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
resolveLocale: function (locale, locales) {
|
resolveLocale: function (locale, locales) {
|
||||||
// If the locale exists as-is, use it
|
// If the locale exists as-is, use it
|
||||||
if (locales.includes(locale)) {
|
if (locales.includes(locale)) {
|
||||||
|
|
|
@ -116,6 +116,7 @@ about.getInvolved = Want to help? [Get involved] today!
|
||||||
punctuation.openingQMark = “
|
punctuation.openingQMark = “
|
||||||
punctuation.closingQMark = ”
|
punctuation.closingQMark = ”
|
||||||
punctuation.colon = :
|
punctuation.colon = :
|
||||||
|
punctuation.colon.withString = %S:
|
||||||
punctuation.ellipsis = …
|
punctuation.ellipsis = …
|
||||||
|
|
||||||
install.quickStartGuide = Zotero Quick Start Guide
|
install.quickStartGuide = Zotero Quick Start Guide
|
||||||
|
|
Loading…
Reference in a new issue