Activate campaign site
Перейти к файлу
Martijn Dekker 317c5da7c5 Pontoon: Update Interlingua (ia) localization of Mozilla Activate
Localization authors:
- Martijn Dekker <martijn@inlv.org>
2019-12-02 01:12:08 +00:00
config Update build tooling to same version as CRA2 has - includes node_modules babeling (#305) 2018-09-27 19:53:23 +02:00
public Pontoon: Update Interlingua (ia) localization of Mozilla Activate 2019-12-02 01:12:08 +00:00
scripts Update Packages 2019-03-10 13:51:53 +01:00
src Add Firefox Accounts campaign (fixes #368) 2019-11-26 17:48:07 +01:00
.eslintignore Add linter configuration and script. 2018-11-26 16:07:01 +02:00
.eslintrc.js Add comma-dangle eslint rule and fix all eslint errors/warning 2019-07-27 21:23:01 +02:00
.gitignore adding .idea to gitignore 2018-11-09 14:06:09 +02:00
.nvmrc Adding basic components 2018-11-13 13:44:05 +02:00
.travis.yml Build from master 2019-03-09 11:44:16 +01:00
CODE_OF_CONDUCT.md Update CoC wording according to template (fixes #338) 2019-03-30 01:10:20 +01:00
LICENSE Update Links from HTTP to HTTPS (#313) 2018-11-18 22:02:15 +01:00
README.md Change requirement to enable locale on website (fixes #343) 2019-04-08 17:31:23 +00:00
contribute.json Remove manual deployment + correctly add 404.html when building 2019-03-25 21:05:27 +01:00
github_404.html Add GitHub 404 handling to make sure we can serve non-existent files 2018-07-19 23:19:39 +02:00
package-lock.json Fix vulnerability 2019-09-20 02:28:07 +02:00
package.json Remove unused bfj dependency 2019-07-27 21:04:17 +02:00

README.md

Activity Campaign site

You can see the current site live at https://activate.mozilla.community/.

How to add or update content

To update content, please change the respective file and make sure you use <Localized> with an id atrribute that is not yet used. Then add a line to the public/locales/en-US/activate.ftl file with the key and your new content. Please use a Localized element per HTML tag you are adding. It's best to have a quick look at existing content to make sure you understand the logic. It's not needed to add the new strings to any other language, this will be done through Pontoon.

Example:

in your content:

<Localized id="some-key">
  <p>This is my paragraph</p> <!-- this text here will only be used if the translation file can't be fetched -->
</Localized>

in public/locales/en-US/activate.ftl:

some-key = This is my paragraph that can be localized

will result in:

<p>This is my paragraph that can be localized</p>

Warning: if you change a string in the public/locales/en-US/activate.ftl file and want to make sure that it will be shown as "needs re-translation" in Pontoon, please change the id of the <Localized> element to new key and use that key for your updated sentence. Fixing typos in the en-US strings does not require a new key as it doesn't need to re-trigger a translation. If this is not done, the new string will not show up as "untranslated" in Pontoon and localizers won't know that it has changed.

Example:

existing content:

<Localized id="existing-content">
  <p>Existing content</p>
</Localized>

should be changed to

<Localized id="new-key">
  <p>Completely new text</p>
</Localized>

and then in public/locales/en-US/activate.ftl remove the existing-content key if it's not used anywhere else and add your new key:

new-key = This is my completely new text that needs re-translation

Submit a new localization

To submit a new localization:

  1. Check on Pontoon if the language is already being translated
  2. If not, open an issue in this repository to add the new language to Pontoon
  3. Somebody with access will add the new language to Pontoon to be translated
  4. File an issue in this repository to have us enable the language on the production website - this can either be when you're done or earlier, if you for example only want to translate the front page and a certain activity

Hack the site

First you need to install the dependencies. Make sure you have node/npm installed first.

$ npm install

Run the site using

$ npm start

You will be able to access the site at http://127.0.0.1:3000/

Building the site for production

To build the site like it is in production, you can run the following npm script:

$ npm run build

How deployment works

This website is hosted on GitHub Pages. There are automated builds and deployments by Travis CI:

  • whenever there is a push to the master branch
  • every 24 hours

To make sure there are not too many concurrent builds, Travis CI is set to:

  • cancel builds if it deems necessary
  • no parallel builds to make sure we keep order

Once the Travis job is done, you will see the changes live at https://activate.mozilla.community/. Please note that currently the github.io link would not work as there are static / dependent links.