Welcome board: Allow localization

This commit is contained in:
Alexander Sulfrian 2016-05-31 21:20:25 +02:00
parent ae2c1fb77f
commit e521fe617e
2 changed files with 6 additions and 4 deletions

View file

@ -294,5 +294,8 @@
"watch": "Watch", "watch": "Watch",
"watching": "Watching", "watching": "Watching",
"watching-info": "You will be notified of any change in this board", "watching-info": "You will be notified of any change in this board",
"welcome-board": "Welcome Board",
"welcome-list1": "Basics",
"welcome-list2": "Advanced",
"what-to-do": "What do you want to do?" "what-to-do": "What do you want to do?"
} }

View file

@ -394,7 +394,6 @@ if (Meteor.isServer) {
return fakeUserId.get() || getUserId(); return fakeUserId.get() || getUserId();
}; };
// XXX i18n
Users.after.insert((userId, doc) => { Users.after.insert((userId, doc) => {
const fakeUser = { const fakeUser = {
extendAutoValueContext: { extendAutoValueContext: {
@ -405,12 +404,12 @@ if (Meteor.isServer) {
fakeUserId.withValue(doc._id, () => { fakeUserId.withValue(doc._id, () => {
// Insert the Welcome Board // Insert the Welcome Board
Boards.insert({ Boards.insert({
title: 'Welcome Board', title: TAPi18n.__('welcome-board'),
permission: 'private', permission: 'private',
}, fakeUser, (err, boardId) => { }, fakeUser, (err, boardId) => {
['Basics', 'Advanced'].forEach((title) => { ['welcome-list1', 'welcome-list2'].forEach((title) => {
Lists.insert({ title, boardId }, fakeUser); Lists.insert({ title: TAPi18n.__(title), boardId }, fakeUser);
}); });
}); });