Add localized string for timestamp
CSL locator
Not included in the CSL locales: https://forums.zotero.org/discussion/comment/412060/#Comment_412060
This commit is contained in:
parent
fe74b02d28
commit
cf8819cc06
3 changed files with 11 additions and 0 deletions
|
@ -47,6 +47,11 @@ Zotero.Cite = {
|
||||||
* @return {String} - Localized string (e.g., 'Livre')
|
* @return {String} - Localized string (e.g., 'Livre')
|
||||||
*/
|
*/
|
||||||
getLocatorString: function (locator) {
|
getLocatorString: function (locator) {
|
||||||
|
// 'timestamp' not included in CSL locales
|
||||||
|
if (locator == 'timestamp') {
|
||||||
|
return Zotero.getString('citation.locator.timestamp');
|
||||||
|
}
|
||||||
|
|
||||||
// Get the best CSL locale for the current Zotero locale
|
// Get the best CSL locale for the current Zotero locale
|
||||||
var cslLocale = Zotero.Utilities.Internal.resolveLocale(
|
var cslLocale = Zotero.Utilities.Internal.resolveLocale(
|
||||||
Zotero.locale,
|
Zotero.locale,
|
||||||
|
|
|
@ -868,6 +868,7 @@ citation.showEditor = Show Editor…
|
||||||
citation.hideEditor = Hide Editor…
|
citation.hideEditor = Hide Editor…
|
||||||
citation.citations = Citations
|
citation.citations = Citations
|
||||||
citation.notes = Notes
|
citation.notes = Notes
|
||||||
|
citation.locator.timestamp = Timestamp
|
||||||
|
|
||||||
report.title.default = Zotero Report
|
report.title.default = Zotero Report
|
||||||
report.parentItem = Parent Item:
|
report.parentItem = Parent Item:
|
||||||
|
|
|
@ -10,6 +10,11 @@ describe("Zotero.Cite", function () {
|
||||||
assert.equal(Zotero.Cite.getLocatorString('sub-verbo'), 'Sub verbo');
|
assert.equal(Zotero.Cite.getLocatorString('sub-verbo'), 'Sub verbo');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should get 'timestamp' in en-US", function () {
|
||||||
|
Zotero.locale = 'en-US';
|
||||||
|
assert.equal(Zotero.Cite.getLocatorString('timestamp'), 'Timestamp');
|
||||||
|
});
|
||||||
|
|
||||||
it("should get 'book' in fr-FR", function () {
|
it("should get 'book' in fr-FR", function () {
|
||||||
Zotero.locale = 'fr-FR';
|
Zotero.locale = 'fr-FR';
|
||||||
assert.equal(Zotero.Cite.getLocatorString('book'), 'Livre');
|
assert.equal(Zotero.Cite.getLocatorString('book'), 'Livre');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue