Code Monkey home page Code Monkey logo

Comments (7)

brendannee avatar brendannee commented on June 12, 2024

You could create a custom template https://github.com/BlinkTagInc/transit-arrivals-widget#templatepath with the translations you need

Or I could update that template file to use https://github.com/mashpie/i18n-node to support various locales so you can generate multiple copies of the widget with different translations.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 12, 2024

from transit-departures-widget.

brendannee avatar brendannee commented on June 12, 2024

That is excellent.

Please make a PR and add views/widget/widget_pl.pug - I'll then do some updates to make the language a configuration option.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 12, 2024

from transit-departures-widget.

brendannee avatar brendannee commented on June 12, 2024

Great - I accepted it.

I refactored the template code to better support multiple languages and moved some text from JS into the template to make it easier to translate. So there are some English words now in the polish template that need translating - if you'd like to do another PR with these additional translations that would be great. https://github.com/BlinkTagInc/transit-arrivals-widget/blob/master/views/widget/content/content_pl.pug

I added documentation on the README about using languageCode parameter.

Are you using this live on any site? Can I add your agency or agencies to the list on the README? (can you send a link to where this is being used)?

Also, if you are fluent in any other languages or work with anyone else who is, PRs for additional language translations are welcome.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 12, 2024

from transit-departures-widget.

brendannee avatar brendannee commented on June 12, 2024

Thanks for that.

I added support for 24-hour vs 12-hour times and also updated this to be an ES module.

Try out the latest version and let me know if you see any issues or have ideas for improvement.

from transit-departures-widget.

Related Issues (6)

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.