Git Product home page Git Product logo

Comments (15)

plata avatar plata commented on August 29, 2024

Maybe:

from scripts.

plata avatar plata commented on August 29, 2024

Another possibility would be to call tr directly:

Packages.org.phoenicis.configuration.localisation.Localisation.tr("translation test.")

This is working but I'm not sure how we can get the text into our .pot and .po files (especially for user repositories).

from scripts.

qparis avatar qparis commented on August 29, 2024

Called tr directly makes more sense. The analysis of the scripts is another problem we can handle quite easily

from scripts.

plata avatar plata commented on August 29, 2024

If we do that, all strings have to be in the properties file which is generated with mvn gettext:dist. I don't see how this should happen for user repositories.

from scripts.

qparis avatar qparis commented on August 29, 2024

The pot files should not necessarily be generated by maven.
We could imagine another process that could generate all the translations from all our git repositories and uploading them to a translation platform.
This is the way it is done in POLv4

from scripts.

plata avatar plata commented on August 29, 2024

Sure. But that's still not enough. For example, I could provide my own scripts in a separate repository. In this case, I would not have any chance to translate those.

from scripts.

qparis avatar qparis commented on August 29, 2024

You could add your translation to the main repository, it should work fine

from scripts.

plata avatar plata commented on August 29, 2024

Doesn't that defeat the whole point of custom repositories? I might not even want my strings to be available publicly (e.g. in a company environment). With a solution which loads a json with the translations at runtime, I could provide my own translation file for my repository.

from scripts.

qparis avatar qparis commented on August 29, 2024

Correct

from scripts.

qparis avatar qparis commented on August 29, 2024

Then we should also allow to include po files in a repository

from scripts.

plata avatar plata commented on August 29, 2024

Yes.

from scripts.

plata avatar plata commented on August 29, 2024

The problem with the solution from localeplanet is that it seems to do only a simple mapping. So no plural forms etc.

from scripts.

plata avatar plata commented on August 29, 2024

I managed to get i18next running after changing the i18next.js a little bit. So I guess we could use that.
However, there's still another problem: How do we translate the .json files?

from scripts.

plata avatar plata commented on August 29, 2024

I opened a PR (PhoenicisOrg/phoenicis#870) to solve the .json translation).

from scripts.

plata avatar plata commented on August 29, 2024

Fixed.

from scripts.

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.