mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Move Dutch translations to nl.coffee and leave only nl-BE deviations
This commit is contained in:
parent
b8296c67a1
commit
7453dafa63
6 changed files with 5187 additions and 3103 deletions
|
@ -48,6 +48,7 @@ module.exports =
|
|||
'hi': { nativeDescription: 'मानक हिन्दी', englishDescription: 'Hindi' }
|
||||
'ms': { nativeDescription: 'Bahasa Melayu', englishDescription: 'Bahasa Malaysia' }
|
||||
'my': { nativeDescription: 'မြန်မာစကား', englishDescription: 'Myanmar language' }
|
||||
'nl': { nativeDescription: 'Nederlands', englishDescription: 'Dutch' }
|
||||
'nl-BE': { nativeDescription: 'Nederlands (België)', englishDescription: 'Dutch (Belgium)' }
|
||||
'nl-NL': { nativeDescription: 'Nederlands (Nederland)', englishDescription: 'Dutch (Netherlands)' }
|
||||
'ja': { nativeDescription: '日本語', englishDescription: 'Japanese' }
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2057
app/locale/nl.coffee
Normal file
2057
app/locale/nl.coffee
Normal file
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,7 @@ require("locale/pt-PT")
|
|||
require("locale/pl")
|
||||
require("locale/it")
|
||||
require("locale/tr")
|
||||
require("locale/nl")
|
||||
require("locale/nl-BE")
|
||||
require("locale/nl-NL")
|
||||
require("locale/fa")
|
||||
|
|
25
scripts/consolidate-language-family.coffee
Normal file
25
scripts/consolidate-language-family.coffee
Normal file
|
@ -0,0 +1,25 @@
|
|||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
en = require('../app/locale/en').translation
|
||||
|
||||
localeCodes =
|
||||
parent: 'nl'
|
||||
childA: 'nl-NL'
|
||||
childB: 'nl-BE'
|
||||
|
||||
localeSources = {}
|
||||
for kind, code of localeCodes
|
||||
localeSources[kind] = fs.readFileSync(path.join(__dirname, "../app/locale/#{code}.coffee"), encoding='utf8').split('\n')
|
||||
|
||||
for parentLine, index in localeSources.parent
|
||||
for childKey in ['childA', 'childB', 'childC']
|
||||
continue unless childLine = localeSources[childKey]?[index]
|
||||
if childLine is parentLine and childLine isnt ''
|
||||
childLine = '#' + parentLine
|
||||
localeSources[childKey][index] = childLine
|
||||
|
||||
for childKey in ['childA', 'childB', 'childC']
|
||||
continue unless childCode = localeCodes[childKey]
|
||||
childLines = localeSources[childKey]
|
||||
newContents = childLines.join('\n')
|
||||
fs.writeFileSync "app/locale/#{childCode}.coffee", newContents
|
Loading…
Reference in a new issue