Giter VIP home page Giter VIP logo

Comments (15)

0x-r4bbit avatar 0x-r4bbit commented on May 13, 2024

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.

0x-r4bbit avatar 0x-r4bbit commented on May 13, 2024

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.

lanterndev avatar lanterndev commented on May 13, 2024

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.

knalli avatar knalli commented on May 13, 2024

World not be a simple transformer enough?

from angular-translate.

lanterndev avatar lanterndev commented on May 13, 2024

wat

from angular-translate.

knalli avatar knalli commented on May 13, 2024

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.

lanterndev avatar lanterndev commented on May 13, 2024

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.

knalli avatar knalli commented on May 13, 2024

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.

lanterndev avatar lanterndev commented on May 13, 2024

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.

jamesandres avatar jamesandres commented on May 13, 2024

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:

  1. Pre-processing translation files using a build process (eg: Grunt) then loading them statically
  2. 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.

0x-r4bbit avatar 0x-r4bbit commented on May 13, 2024

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.

lanterndev avatar lanterndev commented on May 13, 2024

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.

jamesandres avatar jamesandres commented on May 13, 2024

@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.

jamesandres avatar jamesandres commented on May 13, 2024

I should add, this code is a work in progress. Certainly, it has not been tested in production yet ;-)

from angular-translate.

lanterndev avatar lanterndev commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.