mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Localized 'Create New ..' and 'Search .. Here'
This commit is contained in:
parent
c2d247e686
commit
b8b22bb739
4 changed files with 22 additions and 3 deletions
|
@ -247,6 +247,12 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
|
|||
create_system_title: "Create New System"
|
||||
new_component_title: "Create New Component"
|
||||
new_component_field_system: "System"
|
||||
new_article_title: "Create a New Article"
|
||||
new_thang_title: "Create a New Thang Type"
|
||||
new_level_title: "Create a New Level"
|
||||
article_search_title: "Search Articles Here"
|
||||
thang_search_title: "Search Thang Types Here"
|
||||
level_search_title: "Search Levels Here"
|
||||
|
||||
article:
|
||||
edit_btn_preview: "Preview"
|
||||
|
|
|
@ -247,6 +247,12 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
|
|||
create_system_title: "Maak een nieuw Systeem aan"
|
||||
new_component_title: "Maak een nieuw Component aan"
|
||||
new_component_field_system: "Systeem"
|
||||
new_article_title: "Maak een Nieuw Artikel"
|
||||
new_thang_title: "Maak een Nieuw Thang Type"
|
||||
new_level_title: "Maak een Nieuw Level"
|
||||
article_search_title: "Zoek Artikels Hier"
|
||||
thang_search_title: "Zoek Thang Types Hier"
|
||||
level_search_title: "Zoek Levels Hier"
|
||||
|
||||
article:
|
||||
edit_btn_preview: "Voorbeeld"
|
||||
|
|
|
@ -10,8 +10,9 @@ block content
|
|||
if me.get('anonymous')
|
||||
a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/signup", role="button") Sign Up to Create a New #{modelLabel}
|
||||
else
|
||||
a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal") Create a New #{modelLabel}
|
||||
input#search(placeholder="Search #{modelLabel}s Here")
|
||||
a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal" data-i18n="#{currentNew}") Create a New Something
|
||||
|
||||
input#search(data-i18n="[placeholder]#{currentSearch}")
|
||||
hr
|
||||
div.results
|
||||
table
|
||||
|
|
|
@ -28,14 +28,20 @@ module.exports = class ThangTypeHomeView extends View
|
|||
|
||||
getRenderData: ->
|
||||
context = super()
|
||||
context.modelLabel = @modelLabel
|
||||
switch @modelLabel
|
||||
when 'Level'
|
||||
context.currentEditor = 'editor.level_title'
|
||||
context.currentNew = 'editor.new_level_title'
|
||||
context.currentSearch = 'editor.level_search_title'
|
||||
when 'Thang Type'
|
||||
context.currentEditor = 'editor.thang_title'
|
||||
context.currentNew = 'editor.new_thang_title'
|
||||
context.currentSearch = 'editor.thang_search_title'
|
||||
when 'Article'
|
||||
context.currentEditor = 'editor.article_title'
|
||||
context.currentNew = 'editor.new_article_title'
|
||||
context.currentSearch = 'editor.article_search_title'
|
||||
@$el.i18n()
|
||||
context
|
||||
|
||||
constructor: (options) ->
|
||||
|
|
Loading…
Reference in a new issue