Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions bin/create-locales
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env node --use_strict

/*
* If a locale doesn't exist create it under locale and generate
* the relevant po files from the .pot
*/

const config = require('config');
const fs = require('fs');
const glob = require('glob');
const path = require('path');
const shell = require('shelljs');

const supportedLocales = config.get('supportedLocales');
const localeDir = path.join(__dirname, '../locale');
const templateDir = path.join(localeDir, 'templates/LC_MESSAGES');
const potFiles = glob.sync(`${templateDir}/*.pot`);

let locale;
let potFile;
let fileName;
let outputFile;

for (locale of supportedLocales) {
locale = locale.replace('-', '_');
shell.exec(`mkdir -p ${localeDir}/${locale}/LC_MESSAGES/`);
for (potFile of potFiles) {
fileName = path.basename(potFile, '.pot');
outputFile = path.join(localeDir, locale, 'LC_MESSAGES', `${fileName}.po`);
try {
fs.statSync(outputFile);
// eslint-disable-next-line no-console
console.log(`${outputFile} already exists skipping`);
} catch (e) {
if (e.code === 'ENOENT') {
shell.exec(`msginit --no-translator --input=${templateDir}/${fileName}.pot
--output-file=${outputFile} -l ${locale}`.replace('\n', ' '));
} else {
throw e;
}
}
}
}
52 changes: 52 additions & 0 deletions en_GB.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
msgid ""
msgstr ""
"Project-Id-Version: disco\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-05-20 11:26+0000\n"
"PO-Revision-Date: 2016-05-20 11:26+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Content-Type: text/plain; charset=utf-8\n"
"Language: en_GB\n"

#: src/disco/components/Addon.js:55
msgid "An unexpected error occurred"
msgstr "An unexpected error occurred"

#: src/disco/components/Addon.js:80
msgid "Preview %(name)s"
msgstr "Preview %(name)s"

#: src/disco/containers/App.js:18
msgid "Discover Add-ons"
msgstr "Discover Add-ons"

#: src/disco/containers/DiscoPane.js:20
msgid "Personalize Your Firefox"
msgstr "Personalize Your Firefox"

#: src/disco/containers/DiscoPane.js:21
msgid ""
"There are thousands of add-ons that let you make Firefox all your\n"
"own—everything from fun visual themes to powerful tools and features.\n"
"Here are a few great ones to check out."
msgstr ""
"There are thousands of add-ons that let you make Firefox all your\n"
"own—everything from fun visual themes to powerful tools and features.\n"
"Here are a few great ones to check out."

#: src/disco/containers/DiscoPane.js:27
msgid "Click to play"
msgstr "Click to play"

#: src/disco/containers/DiscoPane.js:28
msgid "to find out more about add-ons"
msgstr "to find out more about add-ons"

#: src/disco/containers/InstallButton.js:75
msgid "Install"
msgstr "Install"
49 changes: 49 additions & 0 deletions locale/af/LC_MESSAGES/disco.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
msgid ""
msgstr ""
"Project-Id-Version: disco\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-05-20 11:26+0000\n"
"PO-Revision-Date: 2016-05-20 11:26+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"Content-Type: text/plain; charset=utf-8\n"
"Language: af\n"

#: src/disco/components/Addon.js:55
msgid "An unexpected error occurred"
msgstr ""

#: src/disco/components/Addon.js:80
msgid "Preview %(name)s"
msgstr ""

#: src/disco/containers/App.js:18
msgid "Discover Add-ons"
msgstr ""

#: src/disco/containers/DiscoPane.js:20
msgid "Personalize Your Firefox"
msgstr ""

#: src/disco/containers/DiscoPane.js:21
msgid ""
"There are thousands of add-ons that let you make Firefox all your\n"
"own—everything from fun visual themes to powerful tools and features.\n"
"Here are a few great ones to check out."
msgstr ""

#: src/disco/containers/DiscoPane.js:27
msgid "Click to play"
msgstr ""

#: src/disco/containers/DiscoPane.js:28
msgid "to find out more about add-ons"
msgstr ""

#: src/disco/containers/InstallButton.js:75
msgid "Install"
msgstr ""
127 changes: 127 additions & 0 deletions locale/af/LC_MESSAGES/search.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
msgid ""
msgstr ""
"Project-Id-Version: search\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-05-20 14:41+0000\n"
"PO-Revision-Date: 2016-05-20 14:41+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"Content-Type: text/plain; charset=utf-8\n"
"Language: af\n"

#: src/core/components/LoginPage/index.js:13
msgid "Login Required"
msgstr ""

#: src/core/components/LoginPage/index.js:20
msgid "You must be logged in to access this page."
msgstr ""

#: src/core/components/LoginPage/index.js:24
msgid "Login"
msgstr ""

#: src/core/components/NotFound.js:8
msgid "We're sorry, but we can't find what you're looking for."
msgstr ""

#: src/core/components/NotFound.js:9
msgid ""
"The page or file you requested wasn't found on our site. It's possible that "
"you\n"
"clicked a link that's out of date, or typed in the address incorrectly."
msgstr ""

#: src/core/containers/HandleLogin/index.js:41
msgid "Logging you in..."
msgstr ""

#: src/core/containers/HandleLogin/index.js:45
msgid "There was an error logging you in, please try again."
msgstr ""

#: src/search/components/SearchForm.js:30
msgid "Search"
msgstr ""

#: src/search/components/SearchPage.js:29
msgid "Add-on Search"
msgstr ""

#: src/search/components/SearchResult/index.js:18
msgid "%(count)s file"
msgid_plural "%(count)s files"
msgstr[0] ""
msgstr[1] ""

#: src/search/components/SearchResults.js:32
msgid "Your search for \"%(query)s\" returned %(count)s results."
msgstr ""

#: src/search/components/SearchResults.js:39
msgid "Searching..."
msgstr ""

#: src/search/components/SearchResults.js:41
msgid "No results were found for \"%(query)s\"."
msgstr ""

#: src/search/components/SearchResults.js:43
msgid "Please supply a valid search"
msgstr ""

#: src/search/containers/AddonPage/index.js:108
msgid "Attributes"
msgstr ""

#: src/search/containers/AddonPage/index.js:110
msgid "Tags"
msgstr ""

#: src/search/containers/AddonPage/index.js:31
msgid "View on editors"
msgstr ""

#: src/search/containers/AddonPage/index.js:35
msgid "View homepage"
msgstr ""

#: src/search/containers/AddonPage/index.js:41
msgid "Email support"
msgstr ""

#: src/search/containers/AddonPage/index.js:47
msgid "View support site"
msgstr ""

#: src/search/containers/AddonPage/index.js:70
msgid "Current version"
msgstr ""

#: src/search/containers/AddonPage/index.js:73
msgid "View on site"
msgstr ""

#: src/search/containers/AddonPage/index.js:74
msgid "Edit on site"
msgstr ""

#: src/search/containers/AddonPage/index.js:76
msgid "Files"
msgstr ""

#: src/search/containers/AddonPage/index.js:85
msgid "Download"
msgstr ""

#: src/search/containers/AddonPage/index.js:95
msgid "No current version"
msgstr ""

#: src/search/containers/App.js:18
msgid "Add-ons Search"
msgstr ""
49 changes: 49 additions & 0 deletions locale/ar/LC_MESSAGES/disco.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
msgid ""
msgstr ""
"Project-Id-Version: disco\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-05-20 11:26+0000\n"
"PO-Revision-Date: 2016-05-20 11:26+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"Content-Type: text/plain; charset=utf-8\n"
"Language: ar\n"

#: src/disco/components/Addon.js:55
msgid "An unexpected error occurred"
msgstr ""

#: src/disco/components/Addon.js:80
msgid "Preview %(name)s"
msgstr ""

#: src/disco/containers/App.js:18
msgid "Discover Add-ons"
msgstr ""

#: src/disco/containers/DiscoPane.js:20
msgid "Personalize Your Firefox"
msgstr ""

#: src/disco/containers/DiscoPane.js:21
msgid ""
"There are thousands of add-ons that let you make Firefox all your\n"
"own—everything from fun visual themes to powerful tools and features.\n"
"Here are a few great ones to check out."
msgstr ""

#: src/disco/containers/DiscoPane.js:27
msgid "Click to play"
msgstr ""

#: src/disco/containers/DiscoPane.js:28
msgid "to find out more about add-ons"
msgstr ""

#: src/disco/containers/InstallButton.js:75
msgid "Install"
msgstr ""
Loading