Skip to content

Commit 6654826

Browse files
Merge pull request #516 from marinintim/update_readme
Update README on running locally
2 parents c9763bd + 2517291 commit 6654826

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ We ask that you make pull requests because changes to this repository will get d
1212

1313
## Running the app locally
1414

15-
This is a static site, simply open `index.html` or use your favorite static file server to run local server.
16-
17-
You can also use the included development static server by running the following commands:
15+
This is a static site with a build step, simply run `npm start`:
1816

1917
```
2018
npm install
@@ -40,19 +38,19 @@ This will prompt you to enter a language code and will generate your language fi
4038

4139
When picking your language code, please use the correct code from the first column of this spreadsheet: http://en.wikiversity.org/wiki/ISO_639-1_language_matrix
4240

43-
The way translations are implemented is using 100% client-side JavaScript. When the page is loaded the users browser locale is detected (using [browser-locale](http://npmjs.org/browser-locale)) and a XHR request is made to the `languages` folder to try and fetch a JSON translation file for that locale. First we check for the full 5 character locale file (e.g. `en-us`) and if that doesn't exist we fallback to the 2 character version (`en`) and if that doesn't exist we just do nothing and show the default English version.
41+
The way translations are implemented is building static pages using Codeship (see `./scripts` for details).
4442

4543
Translation files are a mapping of translations IDs to the translated strings. There is a separate file called `languages/selectors.json` which maps CSS selectors in markup to the translation IDs.
4644

4745
The good things about this approach:
4846

47+
- Every language is indexed by search engines.
4948
- The site remains a static site. This means that contributing to the site is really easy as the entire site is just flat HTML, CSS, JS and JSON files
50-
- When PRs get merged they are immediately deployed live to GitHub pages. This makes maintenance really nice as there is no manual deploy step.
49+
- When PRs get merged they are almost immediately deployed live to GitHub pages. This makes maintenance really nice as there is no manual deploy step.
5150

5251
The drawbacks of this approach:
5352

54-
- Only the English (default) version is indexed by search engines
55-
- The English version briefly appears on page loads before the translated version is swapped in
53+
- Default branch is `source` as we can't use `master` anymore.
5654

5755
### Update Translations
5856

0 commit comments

Comments
 (0)