Add howto_add_language.org
This commit is contained in:
parent
29f315d918
commit
b950698032
2 changed files with 29 additions and 24 deletions
|
@ -1,24 +0,0 @@
|
|||
| Introduction
|
||||
|
||||
This post documents the process that should be
|
||||
followed when adding a new locale or language
|
||||
to the website.
|
||||
|
||||
Ideally the process would require a minimal amount
|
||||
of manual work and be fast to complete but we're
|
||||
not quite there yet.
|
||||
|
||||
The process:
|
||||
|
||||
* Add new locale to file 'Rules'
|
||||
(/Rules)
|
||||
* Add new locale to array 'Quran.locales'
|
||||
(/packages/Quran/src/index.ts)
|
||||
* Add new locale (+ translations)
|
||||
(/src/json/t.json)
|
||||
(/src/json/surahs.json)
|
||||
(/src/json/<locale>/<surahId>/{info,surah}.json)
|
||||
|
||||
Note that 'src/json/<locale>/<surahId>/info.json' can
|
||||
be generated from the contents of 'src/json/surahs.json'
|
||||
via: 'rake t:surahs.json'
|
29
share/doc/al-quran.reflectslight.io/howto_add_language.org
Normal file
29
share/doc/al-quran.reflectslight.io/howto_add_language.org
Normal file
|
@ -0,0 +1,29 @@
|
|||
* Introduction
|
||||
|
||||
This document explains the process that should be
|
||||
followed when adding a new locale or language
|
||||
to the website. Ideally the process would require
|
||||
a minimal amount of manual work and be fast to complete
|
||||
but we're not quite there yet.
|
||||
|
||||
* Steps
|
||||
|
||||
*** 1) Add new locale to file ~/Rules~
|
||||
The ~/Rules~ file has to be updated
|
||||
|
||||
*** 2) Add new locale to array ~Quran.locales~
|
||||
The ~/packages/Quran/src/index.ts~ file has to be updated
|
||||
|
||||
*** 3) Add new locale (+ translations)
|
||||
The following files have to updated:
|
||||
+ ~/src/json/t.json~
|
||||
+ ~/src/json/surahs.json~
|
||||
+ ~/src/json/<locale>/<surahId>/{info,surah}.json~
|
||||
|
||||
*** 4) Save time
|
||||
The ~/src/json/<locale>/<surahId>/info.json~ files can
|
||||
be generated from the contents of ~/src/json/surahs.json~ -
|
||||
and that leaves us with one less step to complete:
|
||||
#+BEGIN_SRC sh
|
||||
user@localhost$ bundle exec rake t:surahs.json
|
||||
#+END_SRC
|
Loading…
Reference in a new issue