Repository navigation
Conversation
A page to add, correct and translate the explanations of the fault codes of EMS-ESP (fault code packs), in the style of the entity and WebUI translation editors: toolbar, language flags, a table with all languages side by side, drafts, and a suggestion that opens a GitHub issue. scripts/translate-faultcodes.js fills in missing translations with DeepL and marks them as machine translated.
6 tasks done
Contributor
|
Shoudl the faultcode editor be referenced in the translations page? I would say that since this is a major and excellent new feature, it deserves its own page in the documentation. Like under https://docs.emsesp.org/Adding-Faultcodes ? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an editor for the fault code lists, like the entity and WebUI translation editors. The lists live in https://github.com/emsesp/faultcodes (brands//{brand.json,codes.json,texts/.json}). They are turned into the packs that the WebUI installs on the Download/Upload page (see emsesp/EMS-ESP32#3493).
What it does
/faultcode-editor(noindex, like the other two editors), same toolbar, table, flag selects and stylesheet (TranslationEditor/styles.module.css).emsesp/faultcodeson GitHub, from a local folder (File System Access) or from single files. Drafts stay in the browser.emsesp/faultcodes(labelsuggestion, a readable summary and the data for the maintainers). Without a GitHub account the text can be copied. Nothing is sent without a click, and a tick box confirms the texts may be shared.scripts/translate-faultcodes.jsfills the missing translations of the lists with DeepL, liketranslate-locale.js: it never changes an existing text and marks generated texts withmachine: true. NeedsDEEPL_API_KEY; run it with--dir <clone of emsesp/faultcodes>;--dry-runshows what would be translated.docs/Adding-Languages.md.Tested
docusaurus build --locale en).emsesp/faultcodes, an edit shows up as a change, and the Send link opensemsesp/faultcodes/issues/newwith the label and the filled-in text (the click was not followed, nothing was sent).tools/apply-suggestion.mjsof the lists repository (dry run).translate-faultcodes.jsdry run only, DeepL was not called.Not tested
de,nl) of the docs build.Notes for review
/faultcode-editorand mentioned indocs/Adding-Languages.md. Tell me where you want a link.translate-faultcodes.jsknow nothing about the WebUI; the format is described in FORMAT.md ofemsesp/faultcodes.