Skip to content

Translating & Text Revisions

GEA Admin edited this page Nov 17, 2024 · 3 revisions

GoBrik and Ecobricks.org are designed from the ground up to enable collaborative translation, editing and updating.

Over the years we've experiemented with all sorts of third party translation platforms. We started with text-pattern. Then Wp-Translations when we were still on wordpress. We used a javascript service for a while. Finally, we've built our own! Our pages uses our own language switcher function that is fully open source. It has its own repository here: https://github.com/russs95/earthen-scripts

How it works

The way our GoBrik pages are works is through the insertion of texts. Basically, each page on our site has its own source file of "snippets" that corresponded to every text element on a page. Each text element has its own data-lang-id and so too each snippet in each language file. These snippets are bits of text and html that compose all the elements of the page. When a user loads a page in english, the browser looks for all the snippets in the english translation file, matches their data-lang-id with those on the page and inserts the text accordingly.

For example, here's an example of a coded snippet in our Indonesian translation file for our project page.

'025-block-2-list-project': 'My Project',

A translator will focus on the snippets text on the right hand side. The text on the left is the data-land-id and doesn't need to be translated. For example here's how this one should be translated to Indonesian:

'025-block-2-list-project': 'Proyek Anda',

Notice that the tags are not translated. HTML tags are always left in english.

While most snippets are simply text, some do conain HTML, file names and links. The translator only focuses on the text that is not html such as HTML and the main text:

'018-block-2-main-image-alt': 'Pilih jenis botol yang ideal',

Here the only text that needs review is the alt tag: "Pilih jenis botol yang ideal". Everything else, the file name and the html need to stay in English.

One final note, all single apostrophe's need to have a backslash in front of them. Like this '

Glossaries

There are many unique terms and words in the Earthen and Ecobrick movements. We keep track of them in our GEA glossaries:

Nomenclature note

In the GoBrik table we write table names with tb_ at the start of the table name (using a plural noun i.e. ecobricks, ecobrickers, etc) if it is only used on GoBrik. On the buwana database we add the _tb at the end of the name (using a plural nound i.e. users, countries, watershed, etc.). On the GoBrik database, if a table is mirrored on Buwana, we name it the same as on the Buwana database (i.e. communities_tb, languages_tb, countries_tb etc.)

Clone this wiki locally