Giter Site home page Giter Site logo

grunt-po2json-angular-translate's People

Contributors

danielavalero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grunt-po2json-angular-translate's Issues

Several json files don't including all strings

We have project structure

project
|- module1
   |- locals
      |- en.po
      |- fr.po
|- module2
   |- locals
      |- en.po
      |- fr.po

start

'compiled/locals' : ['project/**/*.po']

have result

compiled
|- locals
   |- en.json
   |- fr.json

But en/ru.json have string only from module2

Joining the team

Hey @DanielaValero this grunt plugin looks interesting! @firehist also implemented a grunt plugin for angular-translate. We're planning to move to an organization on github (http://github.com/angular-translate) there we also have a grunt-team which currently consists of @firehist only.

Maybe you're interested in joining the team as well? We would then put your grunt plugin under the organization umbrella :)

Work with modular project

Prosess

project
|- module1
   |- locals
      |- en.po
      |- fr.po
|- module2
   |- locals
      |- en.po
      |- fr.po

Create

compiled
|- module1
   |- locals
      |- en.json
      |- fr.json
|- module2
   |- locals
      |- en.json
      |- fr.json

Api example

'compiled/*/locals' : ['project/*/locals/*.po']

Separate json create for each module automatically. It will be useful for big modular project.

Incorrect interpolation variables into plurals

Correct

.po:
msgstr[0] "Время: %d {name} секунда"
msgstr[1] "Время: %d {name} секунд"
msgstr[2] "Время: %d {name} секуды"

.json:
"Время: {{name}} {PLURALIZE, plural, offset:1 =2{# секунда} other{# секунд}}"

Incorrect

.po:
msgstr[0] "Время: %d секунда {name}"
msgstr[1] "Время: %d секунд {name}"
msgstr[2] "Время: %d секуды {name}"

.json:
"Время: {{PLURALIZE, plural, offset:1 =2{# секунда}} other{# секунд}} {name}"

Must be

"Время: {{PLURALIZE, plural, offset:1 =2{# секунда}} other{# секунд}} {{name}}"

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.