~cadence/bibliogram-docs

8549efa9bc7db3da240142d60a1a097758974513 — Cadence Ember a month ago 5f5f50c
Translations: Remember to say the language name
1 files changed, 24 insertions(+), 9 deletions(-)

M docs/Translating.md
M docs/Translating.md => docs/Translating.md +24 -9
@@ 1,15 1,24 @@
# Translating Bibliogram

**Scroll to the bottom of this document for the reference of which
**Scroll to the bottom of this document for context of which
string corresponds to which part of the page.**

## Creating a new translation

### The easy way: just translate the file

In the Bibliogram code repository, copy [`/src/lang/en.js`][en] to a new
file. Translate all the parts. Paste the result into the body of an
email, and send it to [the bibliogram-devel mailing list][list].
In the Bibliogram code repository, copy [`/src/lang/en.js`][en] (or
another existing language that you know well) to a new file. Translate
all the parts. Paste the result into the body of an email, and send it
to [the bibliogram-devel mailing list][list].

Make sure to also include the name of the language that should be
displayed in the settings menu. This should be written in its own
language. For example, the listing for French would be _fran├žais,_
since that is the French word for the French language.

Reminder: scroll to the bottom of this document to see the context for
all the strings.

You won't be able to actually test your changes with this. If you want
to test, you must follow the next section, "the complete way".


@@ 22,9 31,9 @@ to test, you must follow the next section, "the complete way".
Before you can start, [get set up with the submitting a patchset
guide][patchset guide].

Then copy `/src/lang/en.js` to a new file, saving it as [the two letter
code of your language][letter code] with the `.js` extension in the same
folder.
Then copy `/src/lang/en.js` (or another existing language that you
know well) to a new file, saving it as [the two letter code of your
language][letter code] with the `.js` extension in the same folder.

Translate the contents of the new file to your language. While working
on the translation, you may wish to comment out lines that you haven't


@@ 34,7 43,8 @@ and they will show as MISSING STRING on the webpage.

Open `/src/lang/index.js` and inside the `Lang constructor`, find the
array of language codes (at time of writing, it's on line 10 with
contents `["en", "en-us"]`) and add your new language to that array.
contents like `["en", "en-us", "es", "fa",`...) and add your new
language code to that array.

Open `/src/site/pug/settings.pug` and find the `+select` `language`
mixin. Add your new language to that list, with the country code as


@@ 59,8 69,13 @@ in the [patchset guide]. Thank you for contributing!!
  use the Pug compiler.
- `fn_` means the contents must be a JavaScript function. Arrow
  functions `=>` are suggested.
- `meta_` is for internal use and manages data about that language. It
  is not displayed directly, but it is used by code related to
  displaying the language. For example, `meta_direction` can be `ltr`
  or `rtl` to specify which direction the language script is written
  in.

When in doubt, just copy whatever `en.js` is doing.
When in doubt, just style the content like whatever `en.js` is doing.

## String location reference