-
Notifications
You must be signed in to change notification settings - Fork 62
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
hard-coded match strings make this project language dependent #115
Comments
It seems like a worthy goal to make this language-independent. My preferred approach would be changing these parts of the script to search based on langauge-independent things, e.g. the data-x value instead of the data-x + text content. A pull request to do that would be welcome. |
Agreed. But this only works if there're enough markups or annotations in the html/source firstly, and not to insert any text (this will be language specific) when building. Like these: # in file .pre-process-tag-omission.pl:
$$line .= " <dt><span data-x=\"concept-element-tag-omission\">Tag omission in text/html</span>:</dt>\n";
# and:
pushLine($_, " <p>Neither tag is omissible.</p>\n"); By the way, I don't think it's a good idea to maintain semantic-related parts of source in build scripts. I mean, like |
Hmm, I see. I think it's important that we not repeat this boilerplate in the source file. Do you have a proposed solution that allows us to keep the source file clean, but still allows easier translation? |
We can keep the source untouched by providing a i18n configuration (maybe picked up by a LANG env variable) for the build tools. |
I'm trying to translate whatwg/html here: https://whatwg-cn.github.io/html/multipage/
To sync this fork (especially not-yet-translated sections), the build tools (html-build, watssi) are also used in that repo. While I find out the hard coded match strings (in .pre-process-annotate-attributes.pl, .pre-process-tag-omission.pl, and maybe others) will break the build process, for example:
https://github.com/whatwg/html-build/blob/master/.pre-process-annotate-attributes.pl#L18
Now I also translated these perl source files locally. Could there be better solutions to make this tool language in-dependent? Or should I push the zh-Hans version to this project, which may require localization mechanism to be implemented.
The text was updated successfully, but these errors were encountered: