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 transform the translations

See original GitHub issue

Hi guys!

Great work on this. I was trying yo find the way to transform the translations to avoid write them many times (upperCase, snakeCase, etc.). Finally I’m doing this to share the translation component thought all the app. Maybe this is a good feature:

In my case I’m using lodash to do my transformations and here I can wrap the different requirements.

Vue.mixin({
  methods: {
    locale: function (translate, data) {
      return data && data.toUpper ? _.toUpper(this.$t(translate, data)) : this.$t(translate, data)
    }
  }
})

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tikiatuacommented, Dec 13, 2017

A short remark for other readers: This is only the case if you put the interpolation directly into the html of your site. If you pre-compile the vue components (using webpack and vue-loader) or put the markup into a <script type="text/x-template"></script> tag, then this should not be an issue.

https://vuejsdevelopers.com/2017/03/24/vue-js-component-templates/

0reactions
EmilianoBarbozaOjedacommented, Dec 12, 2017

Sure, I don’t want to see that syntax when the view is been rendered. That’s the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

transform - CSS: Cascading Style Sheets - MDN Web Docs
The transform CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting ......
Read more >
translate - CSS-Tricks
The translate CSS property allows you to transfer an element from one place to another along the X (horizontal) axis, the Y (vertical)...
Read more >
Translations intro (article) | Khan Academy
Yes, a translation is a type of transformation. There are 4 simple transformations which are; translation, reflection, rotation, and dilation. Each one of...
Read more >
Translation Transform
The translation transform TV applies to arbitrary shapes point-by-point. Each point of a given shape S is translated by V, and the collection...
Read more >
SVG transformations: translate, rotate and scale
As a current working example displaying a hint of what those richer transforms may allow, you may wish to take a look at...
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