Giter VIP home page Giter VIP logo

Comments (5)

miracle2k avatar miracle2k commented on May 14, 2024

Hm yes, so there actually exists an argument that makes the function in question include untranslated strings, but it's not used by default (and it would affect non-arrays as well). There is also a comment that I no longer understand.

I'll need to take a closer look. Using the default values for arrays generally seems easy enough to do, as long as the .po file contains the untranslated message. If the message is missing, i.e. the .po file is incomplete, then this is an impossible problem to solve right now, because the Import command would not have enough information (it doesn't know the maximum array length and does not look at the original file). Fortunately, that should rarely be the case.

At some point comments may possibly be used to encode additional information. This would solve a lot of these sorts of issues.

from android2po.

timsu avatar timsu commented on May 14, 2024

Second this - arrays that are of the wrong size cause nasty bugs with android apps - and prevent strings files from being usable after a2po is finished with them :(

from android2po.

paour avatar paour commented on May 14, 2024

I've started using lint --check InconsistentArrays to make sure I don't have incomplete array translations... but lint has its own set of issues (it doesn't find all inconsistencies) and it would be better to fix at the source...

from android2po.

paour avatar paour commented on May 14, 2024

I'm not sure this was actually fixed. On 1.3.dev (latest git), when I try to import .po files with incomplete arrays, I have several problems: order is changed, and some incomplete arrays are still incomplete.

In my opinion, incomplete arrays should not at all be imported, or alternatively the missing strings should be replaced with the same string in the source language.

from android2po.

miracle2k avatar miracle2k commented on May 14, 2024

the missing strings should be replaced with the same string in the source language.

That's what it's supposed to do. Look at this test which is passing:

https://github.com/miracle2k/android2po/blob/master/tests/convert/test_string_arrays.py#L122

What is different in your case? I notice that in the test, both array items exist in the .po file, but one has no translations. There is no test for when one item has not occur in the .po file at all.

from android2po.

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.