Scroll to the bottom of this document for the reference of which string corresponds to which part of the page.
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".
Before you can start, get set up with the submitting a patchset guide.
/src/lang/en.js to a new file, saving it as the two letter
code of your language with the
.js extension in the same
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
translated yet using
// at the start of the line. This way, things
that you haven't translated will be syntax highlighted in your editor,
and they will show as MISSING STRING on the webpage.
/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
["en", "en-us"]) and add your new language to that array.
/src/site/pug/settings.pug and find the
mixin. Add your new language to that list, with the country code as
value, and the name (e.g. Français) as
Save all the files, start Bibliogram, go to the settings page, select the language, and make sure everything works as intended. If it doesn't, go back and edit the files. At the time of writing this document, you will need to restart Bibliogram to apply changes to language strings.
Once everything works properly, create and send a patchset as described in the patchset guide. Thank you for contributing!!
html_means the contents must be HTML text. You can either write HTML directly, or invoke the Pug compiler to produce it.
pug_means the contents must be a Pug template function. You must use the Pug compiler.
When in doubt, just copy whatever
en.js is doing.
These images show where strings are located on pages so that you can easily find the context for what you're translating, without having to run Bibliogram yourself to test.