Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations update from Hosted Weblate #9996

Merged
merged 3 commits into from
Jan 26, 2025

Conversation

weblate
Copy link
Collaborator

@weblate weblate commented Jan 25, 2025

Translations update from Hosted Weblate for CircuitPython/main.

Current translation status:

Weblate translation status

FK-sauve and others added 3 commits January 25, 2025 10:05
Currently translated at 99.7% (998 of 1001 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
Currently translated at 100.0% (1001 of 1001 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FK-sauve and @andibing!

@dhalbert dhalbert merged commit 52b5b2d into adafruit:main Jan 26, 2025
12 checks passed
@FK-sauve
Copy link

FK-sauve commented Jan 27, 2025 via email

@dhalbert
Copy link
Collaborator

@FK-sauve broche is fine if it's the more common usage (at least, say, when I look at French-language Arduino sites). Your grammatical changes are probably the most effective changes in terms of saving space.

The error messages are compressed when they are stored. A highly-repeated word like broche will be well-compressed.

Thank you for looking at this, since it helps a lot making the translation more complete and yet still fit on smaller boards.

@FK-sauve
Copy link

FK-sauve commented Jan 27, 2025 via email

@dhalbert
Copy link
Collaborator

@jepler if you have anything to say about frequency and size of words and messagesand compression, please chime in.

@jepler
Copy link
Member

jepler commented Jan 27, 2025

Compression by "words" is enabled for builds where translation compression level (CIRCUITPY_MESSAGE_COMPRESSION_LEVEL) is above 5. This level is not applied to all boards, because it does increase build time.

During the build, the translation compression code uses a heuristic algorithm to choose common character sequences (which need not be aligned at word boundaries, even though the code calls them "words") to represent as a node in the huffman encoding tree: It estimates the savings for each possible n-gram, repeating until a maximum number is reached or it can't find any n-gram which saves space.

Just for curiosity, I did a build of the trinket_m0 board in the French language and checked the list of "words" at the top of the generated file ports/atmel-samd/build-trinket_m0/genhdr/compressed_translations.generated.h:

'on', 'ou', '%q', '\r\n', "l'", 'ent', 'le ', 'es ', 'un ', " d'", 'ant', 'ble', 'de ', ' à ', 'la ', 'ez ', 'age', ' de ', 'tion', 'une ', 'pas ', ' en ', 'hors', 'doiv', 'que ', 'loca', 'roch', 'comp', 'ance', 'objet', 'être ', 'trouv', ' est ', 'inter', ' non ', 'dans ', ' sur ', ' trop', 'avec ', 'octet', 'doit ', ' pour ', 'valeur', 'utilis', 'chaîne', 'ichier', 'démarr', 'rateur', 'nombre', 'classe', 'ystème', 'charge', 'assign', 'Erreur', ' nommé', 'attend', 'support', 'mauvais', 'équence', 'syntaxe', 'argument', 'ne peut ', 'longueur', 'paramètr', 'converti', 'attribut', 'caractèr', ' invalide', 'mpossible', ' doit être ', " n'est pas ", 'obligatoire', ' par défaut'

It looks like "broche" is not here, but "roch" is. This choice probably occurs because "brochage" and capitalized "Broche" both appear, and the heuristic thinks that more matches of a shorter substring are better.

There's no simple way to check this list that is going to be transparent to translators. The list is dynamically generated during each build and depends which modules are enabled/disabled, so the list will be different on another board. The intent is not for translators to know or monitor what is on the list, but for the list of words to be helpful in reducing total firmware size when translators use consistent terminology.

@FK-sauve
Copy link

FK-sauve commented Jan 28, 2025 via email

@jepler
Copy link
Member

jepler commented Jan 28, 2025

No doubt the folks writing the English original text would also have benefited from a little more consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants