Skip to content

Commit

Permalink
Welcome board: Allow localization
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderS committed Jun 3, 2016
1 parent ae2c1fb commit e521fe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,8 @@
"watch": "Watch",
"watching": "Watching",
"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?"
}
7 changes: 3 additions & 4 deletions models/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ if (Meteor.isServer) {
return fakeUserId.get() || getUserId();
};

// XXX i18n
Users.after.insert((userId, doc) => {
const fakeUser = {
extendAutoValueContext: {
Expand All @@ -405,12 +404,12 @@ if (Meteor.isServer) {
fakeUserId.withValue(doc._id, () => {
// Insert the Welcome Board
Boards.insert({
title: 'Welcome Board',
title: TAPi18n.__('welcome-board'),
permission: 'private',
}, fakeUser, (err, boardId) => {

['Basics', 'Advanced'].forEach((title) => {
Lists.insert({ title, boardId }, fakeUser);
['welcome-list1', 'welcome-list2'].forEach((title) => {
Lists.insert({ title: TAPi18n.__(title), boardId }, fakeUser);
});

});
Expand Down

0 comments on commit e521fe6

Please sign in to comment.