فهرست منبع

Shared Templates. In Progress.

Part 3:
- Template container titles "Card/List/Board Templates" automatically
  translated.

Thanks to xet7 !

Related #3313
Lauri Ojansivu 4 سال پیش
والد
کامیت
7f17bc9fb0

+ 5 - 2
client/components/boards/boardHeader.jade

@@ -1,8 +1,11 @@
 template(name="boardHeaderBar")
   h1.header-board-menu
     with currentBoard
-      +viewer
-        = title
+      if $eq title 'Templates'
+        | {{_ 'templates'}}
+      else
+        +viewer
+          = title
 
   .board-header-btns.left
     unless isMiniScreen

+ 8 - 4
client/components/boards/boardHeader.js

@@ -225,7 +225,8 @@ const CreateBoard = BlazeComponent.extendComponent({
 
       this.boardId.set(
         Boards.insert({
-            title: TAPi18n.__('templates'),
+            // title: TAPi18n.__('templates'),
+            title: title,
             permission: 'private',
             type: 'template-container',
           }),
@@ -233,7 +234,8 @@ const CreateBoard = BlazeComponent.extendComponent({
 
       // Insert the card templates swimlane
       Swimlanes.insert({
-          title: TAPi18n.__('card-templates-swimlane'),
+          // title: TAPi18n.__('card-templates-swimlane'),
+          title: 'Card Templates',
           boardId: this.boardId.get(),
           sort: 1,
           type: 'template-container',
@@ -242,7 +244,8 @@ const CreateBoard = BlazeComponent.extendComponent({
       // Insert the list templates swimlane
       Swimlanes.insert(
         {
-          title: TAPi18n.__('list-templates-swimlane'),
+          // title: TAPi18n.__('list-templates-swimlane'),
+          title: 'List Templates',
           boardId: this.boardId.get(),
           sort: 2,
           type: 'template-container',
@@ -252,7 +255,8 @@ const CreateBoard = BlazeComponent.extendComponent({
       // Insert the board templates swimlane
       Swimlanes.insert(
         {
-          title: TAPi18n.__('board-templates-swimlane'),
+          //title: TAPi18n.__('board-templates-swimlane'),
+          title: 'Board Templates',
           boardId: this.boardId.get(),
           sort: 3,
           type: 'template-container',

+ 9 - 2
client/components/swimlanes/swimlaneHeader.jade

@@ -11,8 +11,15 @@ template(name="swimlaneHeader")
 template(name="swimlaneFixedHeader")
   .swimlane-header(
     class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
-      +viewer
-        = title
+      if $eq title 'Card Templates'
+        | {{_ 'card-templates-swimlane'}}
+      else if $eq title 'List Templates'
+        | {{_ 'list-templates-swimlane'}}
+      else if $eq title 'Board Templates'
+        | {{_ 'board-templates-swimlane'}}
+      else
+        +viewer
+          = title
   .swimlane-header-menu
     unless currentUser.isCommentOnly
       if currentUser.isBoardAdmin