At the moment, text is translated from English into other languages, with a few exceptions.
The above idea extends that translation from challenge descriptions and user stories to seed code and tests. It may be no more or less reliable than the current setup.
If AI is used, then we may need to accept it will make mistakes, just like people, while ‘machine “learning”’. I understand that reliability is a great concern. However, translation contributors could not keep pace with changes and new material. Even in the legacy sections, many parts of the non-English language challenges are still in English.
Counter idea: When the English language version of a challenge is updated, each of the other languages for that challenge are opened as sub-issues on GitHub. When all languages are translated, then the main issue (English version) and sub-issues are closed.
Is it possible to select one language to A/B test? This could lay the ground work or at least test feasibility. I realise staff are busy rolling out the new curriculum, new languages, and other issues that crop up. Perhaps something to consider for the future?
Tokens, an array of text, seems like a reliable way to insert text into challenge descriptions, user stories, seed code, and tests. Instead of AI translation though, manual translation is used / reused. Or a dictionary of words and terms stored in the repo.
[ freeCodeCamp/client/i18n/locales/portuguese/translations.json at main · freeCodeCamp/freeCodeCamp · GitHub ]
id: 66ebd4ae2812430bb883c787
title: Build an Event Hub
challengeType: 25
dashedName: lab-event-hub
demoType: onClick
token: ['Past Events']
id: 66ebd4ae2812430bb883cxxx
title: Construa um centro de eventos
challengeType: 25
dashedName: lab-event-hub
demoType: onClick
token: ['Past Events']
The token accesses the 'Past Events'token key, in the Portuguese translation JSON file, and obtains the value'Eventos Passados'.
{
"token": {
"Past Events": "Eventos Passados",
"close": "Fechar",
"edit": "Editar",
"copy": "Copiar",
"view": "Visualizar",
A similar file would need to exist for the English language:
{
"token": {
"Past Events": "Past Events",
"close": "Close",
"edit": "Edit",
"copy": "Copy",
"view": "View",
token[0] points to 'Past Events'in the English version.
token[0] points to 'Eventos Passados' in the Portugeuse version.