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.

Allow optionally giving an example to interpolation with i18n

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

It is not possible to specify an example for interpolation text.

Expected behavior

We should be able to specify an example sometimes. Renaming the variable to make more sense is fine too, or adding more context in

Minimal reproduction of the problem with instructions

<span i18n="saying hi">
  Hello, {{ name // i18n(ph="name", ex="John") }}
</span>

What is the motivation / use case for changing the behavior?

Our translators sometimes raise questions (these cause translations to be delayed) which could have been avoided if we had an example in the placeholder.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JarekTorocommented, May 9, 2018

How does this work while translating an attribute? Is

Example:

 <span *ngIf='element.latestRecord'
 matTooltip='Currently Checked Out To {{element.latestRecord?.publisherName}}'
i18n-matTooltip="@@CurrentlyCheckedOutToTooltipPopover" matTooltipPosition='right'>

I have been unsuccessful in making a translation file that can handle the interpolation inside of an attribute.

0reactions
angular-automatic-lock-bot[bot]commented, Jul 25, 2021

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interpolation - i18next documentation
Interpolation is one of the most used functionalities in I18N. It allows integrating dynamic values into your translations.
Read more >
Internationalization in React: Interpolation, Formatting and ...
(This is optional but this gives an understanding of how the values are interpolated and translated). Now we will see how these keys...
Read more >
Message Format Syntax - Vue I18n
Named interpolation allows you to specify variables defined in JavaScript. In the locale message above, you can localize it by giving the ...
Read more >
i18n with tagged template literals in ECMAScript 2015
Let's start with an example of how we want to use the i18n tag. ... Matches optional type annotations in i18n strings. //...
Read more >
Rails Internationalization (I18n) API - Ruby on Rails Guides
Abstract strings in your application into keyed dictionaries — e.g. flash messages, static text in your views, etc. Store the resulting dictionaries somewhere....
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