Giter Club home page Giter Club logo

Comments (3)

mikedawson avatar mikedawson commented on May 25, 2024

Hi,

The idea of Moko resources is that you should be able to use your existing Android xml files with Kotlin Multiplatform (Android, Web, Desktop/JVM, iOS, etc). As per the README the developer is expected to have one strings.xml (unlike other Android projects where there can be multiple strings.xml) and plurals need to be in a separate file (which as above uses "plural" not "plurals" - no idea why). This means there must be two separate base files, which on Weblate can be handled by having two components in one project.

To be honest, it seems like the Moko resources project is not getting the love it needs. I think people might move to Lyricist - which can import strings.xml .

I think if the Android strings support is updated to recognize both plural and plurals, that should do the trick and I can't see it having any adverse side effects.

from translate.

nijel avatar nijel commented on May 25, 2024

Reading both tags would be simple, but when adding new strings you can start with a file with none of these tags, and then it needs a sensible behavior. A separate format is a better way as it will make it clear what it does without relying on some heuristics.

Anyway, adding a format on top of Android which just changes a single tag is easy, I will do that later today.

If you are interested in adding Lyricist support, please open a separate issue with a description of the format and links to a documentation. I know documenting formats is frequently not done, but how then library authors expect support from other tooling?.

from translate.

mikedawson avatar mikedawson commented on May 25, 2024

I think it would be OK if you just use the official Android xml (e.g. plurals) when adding a string. If someone is using the unofficial version, then they need to do so manually.

Lyricist supports using strings.xml . It also supports putting strings directly into Kotlin code (does not seem like a good idea to me - translation and coding are different skill sets). I don't think there is any need for explicitly adding support to translate toolkit, we can use strings.xml and let Lyricist process the strings.xml file.

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