GithubHelp home page GithubHelp logo

Translation and deployment about maskmath HOT 8 CLOSED

aatishb avatar aatishb commented on August 24, 2024
Translation and deployment

from maskmath.

Comments (8)

nlehuen avatar nlehuen commented on August 24, 2024 2

I can contribute a French translation when the process is clear!

from maskmath.

DeepSpace2 avatar DeepSpace2 commented on August 24, 2024 1

I just saw that this is hosted by github pages, so this should be extremely easy :)

Please see my current attempt on https://deepspace2.github.io/maskmath/. It's very basic. The select element change event shows and hides relevant p elements . Each translation/language text is in its own p element, with the class attribute being the the 2-letters language code (which is also the value of the option element).

from maskmath.

DeepSpace2 avatar DeepSpace2 commented on August 24, 2024 1

@aatishb I agree, I think having a separate page for each language might be the simplest.

from maskmath.

aatishb avatar aatishb commented on August 24, 2024

Hi there,

Thanks for creating this issue & for your interest in adding translations. I'd love to add translations and a few people have also already indicated interest in translating this to other languages.

One simple way to go about this would be to make a copy of the index.html page for each language (I think all the text content is contained in that one page). So e.g. we could add an index-es.html for spanish, and so on, and provide a link on the index.html page to all of the translations. This might make it easier for people without coding experience to add translations. Although there are probably some cons to this approach?

Another way might be to use something like vue i18n. I'm not so familiar with that, but am open to thoughts on how best to go about adding translations. My instinct is to go for a quick solution that would be simplest for contributors to add translations.

from maskmath.

DeepSpace2 avatar DeepSpace2 commented on August 24, 2024

@aatishb Glad you liked the initiative.

To be honest I think vue i18n might be an overkill (and it doesn't provide for people with no coding experience).
I went ahead with my initial idea but I think it will be cumbersome to maintain and to "explain" to people how to contribute translations.

I did like your first suggestion, having a dedicated index-<langauge>.html for each language, but I'm afraid that will have the same issues as the previous approaches.

I think what we can do is "templatize" the current index.html, and load the translations from a <language-code>.json file, but I'm not sure what the keys in such file would be (it would be weird to have the entire English sentence as key, it will also be problematic to maintain the styling).

from maskmath.

aatishb avatar aatishb commented on August 24, 2024

@nlehuen great! A couple of people wrote in volunteering to translate to Spanish and Portugese as well.

@DeepSpace2 Thanks for looking into this further. I suspect adopting a .json file may be a bit cumbersome, and may create unexpected issues with styling and accessibility (e.g. for people using screen readers). My current feeling is that while index-<language>.html has the barrier of requiring HTML knowledge, it has a good ratio of number of potential contributors to ease of setting up this system, and would be simpler to set up and maintain compared to a more javascript heavy approach.

Open to other thoughts on this. Once we converge, I can put together a contributor's guide for translators.

from maskmath.

aatishb avatar aatishb commented on August 24, 2024

Added a contributor's guide for translations here: #4

from maskmath.

aatishb avatar aatishb commented on August 24, 2024

@DeepSpace2 feel free to close this if it's resolved. @nlehuen you're welcome to take on a French translation.

from maskmath.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.