summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/main/layouts.js14
-rw-r--r--client/components/users/userHeader.js14
2 files changed, 22 insertions, 6 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index 1e50b01a..3b9092c3 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -20,9 +20,17 @@ Template.userFormsLayout.onRendered(() => {
Template.userFormsLayout.helpers({
languages() {
- return _.map(TAPi18n.getLanguages(), (lang, tag) => {
- const name = lang.name;
- return { tag, name };
+ return _.map(TAPi18n.getLanguages(), (lang, code) => {
+ return {
+ tag: code,
+ name: lang.name,
+ };
+ }).sort(function(a, b) {
+ if (a.name === b.name) {
+ return 0;
+ } else {
+ return a.name > b.name ? 1 : -1;
+ }
});
},
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index 73a11fc0..10fb7e62 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -72,9 +72,17 @@ Template.changePasswordPopup.onRendered(function() {
Template.changeLanguagePopup.helpers({
languages() {
- return _.map(TAPi18n.getLanguages(), (lang, tag) => {
- const name = lang.name;
- return { tag, name };
+ return _.map(TAPi18n.getLanguages(), (lang, code) => {
+ return {
+ tag: code,
+ name: lang.name,
+ };
+ }).sort(function(a, b) {
+ if (a.name === b.name) {
+ return 0;
+ } else {
+ return a.name > b.name ? 1 : -1;
+ }
});
},