-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
add translation #991
Comments
as a follow-up question to this from the post above:
what font is used by the AAA and what Lang's are supported by it |
We have two different fonts: a Serif one and a Sans one. EDIT: sorry for the close, that was a misclick mistake on my part |
A small question for the community on this issue. Before I pose the question, a bit of context is necessary. I am working on some concept graphics for the main post at the top but ran into a small issue I am not certain about. So question is as follows, should the names of the lang's in the translation drop down be in English or the translated lang, I have seen it done either way (or should the text in the drop down change with the selected lang) Ex.
|
Is it possible to do both? Like Español (Spanish) |
Yes (a method for translation has not been chosen (from what I can tell) and there is the ability to customize on the AAA's end if need be, this more of a question for me so that I can know what text to put in the concepts that I'm making) but then it would be likely that we would not be able to fit more then 1 translation per row |
Feature Request
Description
One of the highest barriers to entry for any project is an inability to understand the language of the source material or in the case of websites to have to deal with translation Brouwer plugins that can be rather hit or miss with translation. Though, out of the gate, I am aware that adding translation to chapters can be more complicated then other possible additions, in my head this is more of a nice to see some day and of no urgent importance. I am aware that approving translations to chapters would be significantly harder due to the small size of the community so a competitively small amount of languages would be approved by trusted members of the community, and even then reviewing a translation would take more time then a chapter or new implementation for an existing chapter. Though this can be partially fixed by adding a translations.md (or some other similar name) with all the languages that the community can cover and making it explicitly clear that translations out of that list of lang's are unlikely to be merged until someone with knowledge of the lang can take responsibility and becomes a trusted member of the community.
Now that that is out of the way, how might this be implemented. This I will split it into two sections how the UI may work and how the actual translations would work.
UI concept
This is not that complicated, I propose that we add another drop down with translations such as the implementation switcher that would allow one to switch between translations. Below I have attached a concept image I created for how this may look, the dimensions are not 100% accurate to the AAA this is just for conversations, if needed I could make these more accurate to how it looks on AAA (I'm really new to creating concepts such as these) (also as a note these were generated using Affinity Designer, I could, if needed drop the latest version of affinity designer file in also):
(I tried to make the image smaller by putting it in a table but when I did so it disappeared for some reason) (also I did not mention previously but I think its fairly obvious this is with the light theme, because all that would be necessary to switch to a different theme would be to change colors and that is trivial) (also the text in the drop down was based on responses to my comment below)
implementation concept
Off of the top of my head there are several ways this could be achieved, some easier then others though the easier ones would likely take up more space in the repo and be less efficient. Also as mentioned below this really does depend upon what is decided in issue 611 because depending on what is chosen there may be default ways to achieve this with the site generator chosen.
01 rewrite
The first option I can think of is completely rewrite the page in a new file in the new translation language and link them together in the main English translation or in some other JSON, YAML etc. file. This would theoretically be the simplest for potential contributors but may require the most new code for the generation of the site and is definitely the least space efficient taking up most space. (Or there can be a different URL for each translation though that would require generating allot of new URLs though it would require less extra site generation code)
02 POT file based
The second option I can think of is to utilize pot and po files to store translations were each paragraph/ individual piece of separate text is a separate
msgid
and thus can be translated in amsgstr
. As an example of this below I have a code snippet of the first paragraph of the intro translated to Romanian since that is the only language other then English I am comfortable inA few other notes on this method that I would like to point out. For some languages it may be necessary to change were example code and mathematical formulas are at in a page then in english which would be a non trivial matter with this method from what I can tell. It would also be best for items within a table to be separate
msgid
's since that would, from what I can tell make it easier on someone looking to translate a particular page. As for translated plots, when necessary, themsgid
would be the uri to the original image and themsgstr
would be the link to the translated image.~
Additional context
As a side note when I new chapter is added it would not require new translation files to be added because English could be the default and thus assumed, this would be added as a separate pull request when someone wants to add a new lang or just to add the basic infrastructure without adding any translations. This is also in the first paragraph "The Arcane Algorithm Archive is a collaborative effort to create a guide for all important algorithms in all languages". Also if a better method exists for web pages such as this, please comment on this because it relatively new to localization my self and am by no means an expert of any sort. Also as a side note I don't know which lang's the font used supports, if a language that is not supported by the font is added this may lead to some issues so some consideration may need to go into that before a pull request is merged for that.
Also I'm putting this up because I have not seen any others, so if there is a consensus or and existent pull request I understand if this is closed and if so please link me to that so I can gain context. Also if there is an existent plugin or something similar that has its own conventions I would appreciate if a link would be provided since I am not aware of any as of writing this. Since as I'm posting this as leios is live I was going to add a section for honkit translations but since that may not be around for much longer I'm going to leave that out, also I'm going to edit this with images for the UI concept which I still have to do.
I also just noticed this though this is significantly more thorough so I'll post it as is.
For Algorithm Archive Developers
The text was updated successfully, but these errors were encountered: