-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
756f588
commit a76c107
Showing
12 changed files
with
137 additions
and
5,829 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
src/models/localization/de-DE.js → src/models/localization/deu-de.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const facts = [ | ||
"En 1987, los gatos superaron a los perros como la mascota número uno en Estados Unidos.", | ||
]; | ||
const langName = "spanish", | ||
langISO = "esp", | ||
langLocale = "es", | ||
langLocaleName = "spain"; | ||
|
||
module.exports = { | ||
langName, | ||
langISO, | ||
langLocale, | ||
langLocaleName, | ||
code: `${langISO}-${langLocale}`, | ||
codeName: `${langName} (${langLocaleName})`, | ||
facts: facts, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
const localizations = {}; | ||
const basename = path.basename(module.filename); | ||
|
||
// Do a barrel export | ||
// Barrelling all the localization files into a single object | ||
// any file in this folder will get a key in the localizations object | ||
// the key will be the filename without the extension, lowercase | ||
// Example: "eng-US.js" will be called as localizations["eng-us"] | ||
fs.readdirSync(__dirname) | ||
.filter( | ||
(file) => | ||
file.indexOf(".") !== 0 && file !== basename && file.slice(-3) === ".js" | ||
) | ||
.forEach((file) => { | ||
localizations[file.substring(0, file.length - 3).toLowerCase()] = | ||
require(path.join(__dirname, file)).default; | ||
}); | ||
|
||
module.exports = localizations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters