summaryrefslogtreecommitdiffstats
path: root/client/components/users/userHeader.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/users/userHeader.js')
-rw-r--r--client/components/users/userHeader.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index 96c8c95e..be7d4dcb 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -114,10 +114,16 @@ Template.changePasswordPopup.onRendered(function () {
Template.changeLanguagePopup.helpers({
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
- return {
- tag: code,
- name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name,
- };
+ // Same code in /client/components/main/layouts.js
+ // TODO : Make code reusable
+ const tag = code;
+ let name = lang.name;
+ if (lang.name === 'br') {
+ name = 'Brezhoneg';
+ } else if (lang.name === 'ig') {
+ name = 'Igbo';
+ }
+ return { tag, name };
}).sort(function (a, b) {
if (a.name === b.name) {
return 0;