Skip to content

Commit

Permalink
update manifesto
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Oct 28, 2016
1 parent 106ffaa commit d2551fe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/manifold.bundle.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto.js v1.0.0 https://github.com/viewdir/manifesto
// manifesto.js v2.0.0 https://github.com/viewdir/manifesto
declare module exjs {
var version: string;
}
Expand Down
7 changes: 6 additions & 1 deletion dist/manifold.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,12 @@ var Manifesto;
};
MetadataItem.prototype.getValue = function () {
if (this.value) {
return Manifesto.TranslationCollection.getValue(this.value, this.defaultLocale);
var locale = this.defaultLocale;
// if the label has a locale, prefer that to the default locale
if (this.label.length && this.label[0].locale) {
locale = this.label[0].locale;
}
return Manifesto.TranslationCollection.getValue(this.value, locale);
}
return null;
};
Expand Down
7 changes: 6 additions & 1 deletion examples/js/manifold.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,12 @@ var Manifesto;
};
MetadataItem.prototype.getValue = function () {
if (this.value) {
return Manifesto.TranslationCollection.getValue(this.value, this.defaultLocale);
var locale = this.defaultLocale;
// if the label has a locale, prefer that to the default locale
if (this.label.length && this.label[0].locale) {
locale = this.label[0].locale;
}
return Manifesto.TranslationCollection.getValue(this.value, locale);
}
return null;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"gulp-rename": "^1.2.2",
"gulp-typescript": "^2.13.4",
"gulp-utils": "viewdir/gulp-utils",
"manifesto": "viewdir/manifesto#v2.0.0",
"manifesto": "viewdir/manifesto#labellocale",
"merge2": "^1.0.2",
"path": "^0.12.7",
"require-dir": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion typings/manifesto.bundle.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto.js v1.0.0 https://github.com/viewdir/manifesto
// manifesto.js v2.0.0 https://github.com/viewdir/manifesto
declare module exjs {
var version: string;
}
Expand Down

0 comments on commit d2551fe

Please sign in to comment.