question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translation support

See original GitHub issue

We need to make sure that people can translate strings in ng-bootstrap widget templates. Things to do:

  • list widgets and their parts which might require tranlations
  • select a set of supported translation solutions
  • make the necessary changes to the existing templates and code

The current thinking is that we will support Angular translations so the majority of the process should boil down to adding i18n attributes in the templates of widgets needing translations

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jnizetcommented, Apr 15, 2018

Here’s a list of labels to mark for i18n:

  • alert.ts: Close
  • carousel.ts: Previous, Next
  • datepicker-navigation.ts: {{ i18n.getMonthFullName(month.number) }} {{ month.year }} (not sure about this, but the order of these two elements could change depending on the locale)
  • pagination.ts: ««, «, (current), », »», First, Previous, Next, Last
  • progressbar.ts: {{getPercentValue()}}% (because some locales might want those in a different order, or with a space between the value and the percent symbol)
  • rating.ts: ★, ☆ (not sure here, but it could be useful to use other symbols by default, without having to provide a specific star template)
  • timepicker.ts: Increment hours, HH, Hours, Decrement hours, Increment minutes, MM, Minutes, Decrement minutes, Increment seconds, SS, Seconds, Decrement seconds, PM, AM

I would also add the following to the things to do:

  • decide about a naming convention for i18n IDs, and apply this convention for each i18n.

My proposal would be to use ngb.<widget-name>.label-in-dash-case. For example, the label “Decrement hours” would be marked using

<span class="sr-only" i18n="@@ngb.timepicker.decrement-hours">Decrement hours</span>
0reactions
maxokorokovcommented, Apr 27, 2018

@pkozlowski-opensource @jnizet, oh I have nothing against the PR, on the contrary actually! Was just trying to think of use cases that default solution doesn’t cover and see the impact.

For instance, for angular/material they’ve decided to have a translation service, ex: https://material.angular.io/components/datepicker/api#MatDatepickerIntl And with the changes: Subject<void> to refresh… Haven’t researched why, but most likely real life use cases?

Anyway we shouldn’t invent our own translation system right now. And services like in the link above could be added on top / in parallel later if necessary.

@jnizet

I haven’t found such a text in the rating’s template

Yep, because it’s actually in one of methods; But I like your idea as a workaround, I think it should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Translation Support Department
The section provides linguistic and technical support to translators throughout the translation workflow. Furthermore, it provides training courses in the ...
Read more >
Language support | Cloud Translation
Translations from any language to any language in this list are supported. ... You can also list the supported languages by using Cloud...
Read more >
Professional Translation Services - Gengo Translation
Gengo provides fast, affordable, and high quality translation services in all major languages by 1000s of certified translators worldwide.
Read more >
Google Translate Help
Official Google Translate Help Center where you can find tips and tutorials on using Google Translate and other answers to frequently asked questions....
Read more >
LanguageLine Solutions: Language Interpreting and ...
Global leader in interpreting, translation services, localization, and interpreter training. Connect to a professional interpreter 24/7 in 240 languages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found