Comments (15)
Hey yo! I'm currently in The Tramp. Will Take a Look at it once i'm in The
Office. And Hope to make your wishes come True :)
On Friday, June 14, 2013, skivvies wrote:
I just switchedhttps://github.com/getlantern/www.getlantern.org/commit/fea41706b8cto using your awesome static
files loaderhttps://github.com/PascalPrecht/angular-translate-loader-static-filesin preparation for being able to integrate with
transifex.com, an extremely popular platform for managing translations
for software projects.According to http://support.transifex.com/customer/portal/articles/971979,
Transifex supports the Chrome i18n JSON formathttp://support.transifex.com/customer/portal/articles/1080006,
which is slightly different from the JSON format you're using in your super
helpful example plunkr http://plnkr.co/edit/Hw4iMz.Just wondering if I'm doing it wrong, or if angular-translate just does
not yet integrate with Transifex and whether I can help with that. Thanks!—
Reply to this email directly or view it on GitHubhttps://github.com//issues/72
.
/pp Sent from Gmail Mobile
from angular-translate.
So @Skivvies I just took a little look at transifex. You may find this one (#57) interesting. Maybe this answers your question.
from angular-translate.
Thanks, @PascalPrecht. What @DWand said makes sense, that end users shouldn't have to download translation metadata meant just for the translators. Nonetheless, it'd be great if angular-translate supported one of the localization formats that Transifex supports. Do any of the formats listed on http://support.transifex.com/customer/portal/articles/971979 make sense to you for angular-translate?
from angular-translate.
World not be a simple transformer enough?
from angular-translate.
wat
from angular-translate.
Instead of adding direct support for another format, you could generate
(grunt?) a language file based in your preferred transifex file.
Am 15.06.2013 um 15:12 schrieb skivvies [email protected]:
wat
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/72#issuecomment-19496280
.
from angular-translate.
Thanks for the suggestion, @knalli. I thought of that, but the reason I created this issue is that since Transifex is such a popular translation platform, maybe it behooves angular-translate to support one of Transifex's supported formats out-of-the-box, rather than requiring users to go through an extra step. Have a look at some of the important projects that are using Transifex, if you're not already familiar with it:
https://fedora.transifex.com/projects/p/fedora/
https://www.transifex.com/projects/p/Mozilla-Firefox/
https://www.transifex.com/projects/p/django/
https://www.transifex.com/projects/p/bitbucketorg/
etc.
from angular-translate.
Actually, I didn't know something about transifex until now. What is the default format used in transifex? I still didn't get this.
from angular-translate.
There is no single default format in Transifex; it accepts resources in any of the supported formats.
Might be worth it for you to start a project there and experiment with it so you can see what it can do.
from angular-translate.
Just to chime in my 2 cents. I'm currently building an Angular project which consumes data from Drupal's web-services. The translation formats provided by Drupal are also different from what angular-translate expects (surprise, surprise). I also had to write a transformer to get the job done.
I don't think that adding transiflex (or Drupal) support to angular-translate is the right architecture approach here. I would rather that angular-translate codebase stay simple and encourage:
- Pre-processing translation files using a build process (eg: Grunt) then loading them statically
- Integrate with the $http service used in angular-translate-url-loader to post-process translation data before it is fed into angular-translate
from angular-translate.
There was also a proposal to let users modify angular-translate's translation-processor. E.g. angular-translate could provide a default translation-processor (just like it does right know) and optionally, you could "use" your own translation-processor.
So we could either make it possible to add pre-transformer which get executed before angular-translate assigns the data to the internal translation table, or we go a step further and let users replace the whole processor.
from angular-translate.
This sounds great, @PascalPrecht, thank you! And thanks @jamesandres for the helpful suggestions. (If the transformer you wrote for your Drupal project is something you could share, that could be super helpful!)
One thing that occurs to me though is, if there is any standard localization format (http://support.transifex.com/customer/portal/articles/971979 lists several) that it would be equally convenient for angular-translate to use, it could be better to switch to a standard format rather than not using a standard, no? Of course, this wouldn't preclude making the changes suggested above, and those would still totally be awesome.
from angular-translate.
@Skivvies the transformer I wrote was totally server-side so I'm not sure it would be helpful to you. If you are interested, however, I wrote this for Checkdesk a non-profit OSS platform for journalism fact-checking. Over here -> https://github.com/meedan/meedan-checkdesk/blob/develop/drupal/sites/all/modules/custom/checkdesk_services/checkdesk_services_i18n/checkdesk_services_i18n.resource.inc
from angular-translate.
I should add, this code is a work in progress. Certainly, it has not been tested in production yet ;-)
from angular-translate.
Great news: Transifex just added support for the simple key-value JSON format angular-translate already uses! No more pre-processing needed! See transifex/transifex-old-core#254. Closing this issue as obsoleted.
from angular-translate.
Related Issues (20)
- Use templated string as key HOT 1
- bower repo doesn't have latest release tag HOT 3
- De-cloaking broken in 2.18.2 HOT 4
- Default interpolationParams allows access to function constructor HOT 1
- translate dynamic content loaded with ajax HOT 1
- How to use UI router with angular translate? HOT 1
- [email protected] support HOT 5
- translate-sanitize-strategy HOT 4
- “SameSite” attribute warning HOT 1
- Not changing languages on ng-click
- Cookie “NG_TRANSLATE_LANG_KEY” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. HOT 9
- Two Languages at same time HOT 1
- IOS cordova When i upgrade the AngularJs to 1.8.2 the words will be missed which was been translated. HOT 1
- Using AngularJS Filters with Pluralization via MessageFormat HOT 1
- $translatePartialLoader.doesnot allow ë à á characters HOT 4
- $translate.instant with angular expression HOT 1
- Unexpected behavior registering translations with .translations() and using an async loader with .forceAsyncReload(true) HOT 3
- Partial loading can fail silently without any hints HOT 1
- $translateStaticFilesLoader should behave gracefully when one of translations cannot be loaded HOT 1
- Team awareness required: Future project state HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-translate.