Allow transform the translations
See original GitHub issueHi 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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/
Sure, I don’t want to see that syntax when the view is been rendered. That’s the case.