mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
i18n implemented
This commit is contained in:
parent
52d419a823
commit
8107200105
7 changed files with 38 additions and 5 deletions
10
locales/en/app.json
Normal file
10
locales/en/app.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"Habit": "Habit",
|
||||
"Daily": "Daily",
|
||||
"Todo": "Todo",
|
||||
"Reward": "Reward",
|
||||
"Habits": "Habits",
|
||||
"Dailies": "Dailies",
|
||||
"Todos": "Todos",
|
||||
"Rewards": "Rewards"
|
||||
}
|
||||
10
locales/he/app.json
Normal file
10
locales/he/app.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"Habit": "Habit",
|
||||
"Daily": "Daily",
|
||||
"Todo": "Todo",
|
||||
"Reward": "Reward",
|
||||
"Habits": "נווו קדימה!",
|
||||
"Dailies": "Dailies",
|
||||
"Todos": "Todos",
|
||||
"Rewards": "Rewards"
|
||||
}
|
||||
|
|
@ -26,7 +26,8 @@
|
|||
"superagent": "~0.12.4",
|
||||
"resolve": "~0.2.3",
|
||||
"browserify": "1.17.3",
|
||||
"expect.js": "~0.2.0"
|
||||
"expect.js": "~0.2.0",
|
||||
"derby-i18n": "0.0.1"
|
||||
},
|
||||
"private": true,
|
||||
"subdomain": "habitrpg",
|
||||
|
|
|
|||
5
src/app/i18n.coffee
Normal file
5
src/app/i18n.coffee
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
i18n = require 'derby-i18n'
|
||||
|
||||
i18n.plurals.add 'he', (n) -> n
|
||||
|
||||
module.exports = i18n
|
||||
|
|
@ -1,10 +1,17 @@
|
|||
derby = require 'derby'
|
||||
app = derby.createApp module
|
||||
|
||||
{get, view, ready} = app
|
||||
derby.use require('derby-ui-boot'), {styles: []}
|
||||
derby.use require '../../ui'
|
||||
derby.use require 'derby-auth/components'
|
||||
|
||||
# Translations
|
||||
i18n = require './i18n'
|
||||
i18n.localize app,
|
||||
availableLocales: ['en', 'he']
|
||||
defaultLocale: 'en'
|
||||
|
||||
# Custom requires
|
||||
character = require './character'
|
||||
tasks = require './tasks'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<app:rewards:userTokens />
|
||||
{/}
|
||||
</span>
|
||||
<h2 class="task-column_title">Rewards</h2>
|
||||
<h2 class="task-column_title">{{t("Rewards")}}</h2>
|
||||
|
||||
<!-- if pets are enabled, make tabs -->
|
||||
{#if equal(_user.flags.petsEnabled,true)}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Habits Column -->
|
||||
<div class="module">
|
||||
<div class="task-column habits">
|
||||
<h2 class="task-column_title">Habits</h2>
|
||||
<h2 class="task-column_title">{{t("Habits")}}</h2>
|
||||
<app:tasks:newTask type="habit" inputValue="{_newHabit}" placeHolder="New Habit" />
|
||||
<ul class="habits">{#each _habitList as :task}<app:tasks:task />{/}</ul>
|
||||
</div>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<!-- Dailys Column -->
|
||||
<div class="module">
|
||||
<div class="task-column dailys">
|
||||
<h2 class="task-column_title">Daily</h2>
|
||||
<h2 class="task-column_title">{{t("Daily")}}</h2>
|
||||
<app:tasks:newTask type="daily" inputValue="{_newDaily}" placeHolder="New Daily" />
|
||||
<ul class='dailys'>{#each _dailyList as :task}<app:tasks:task />{/}</ul>
|
||||
</div>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<a class="option-action" href="/v1/users/{{_user.id}}/calendar.ics?apiToken={{_user.apiToken}}" rel=tooltip title="iCal"><i class=icon-calendar></i></a>
|
||||
<!-- <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a> -->
|
||||
</span>
|
||||
<h2 class="task-column_title">Todos</h2>
|
||||
<h2 class="task-column_title">{{t("Todos")}}</h2>
|
||||
<div id="todos-chart" style="display:none;"></div>
|
||||
|
||||
<!-- create new todo -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue