Code Monkey home page Code Monkey logo

Comments (6)

miracle2k avatar miracle2k commented on June 26, 2024

Can you explain in more detail what the problem is? The string you posted seems to work fine for me on both import and export.

from android2po.

Macarse avatar Macarse commented on June 26, 2024

http://developer.android.com/guide/topics/resources/string-resource.html

Check the formatting and Styling section.

from android2po.

miracle2k avatar miracle2k commented on June 26, 2024

You're a bit cryptic, but I think you may be talking about this issue:

http://stackoverflow.com/questions/4414389/android-xml-percent-symbol
http://groups.google.com/group/android-developers/browse_thread/thread/017d92dd987a8682

To fix this on your end for now, rather than using formatted="false", you probably could also use "%%s: %%s" (see the accepted answer on StackOverflow).

As for android2po, I think what needs to be supported here is a way to persist attributes like "formatted=false" through the conversion to and from a gettext catalog, so that the resource in the generated language-specific XML files will also have the formatted="false" set if the string in the original did.

from android2po.

Macarse avatar Macarse commented on June 26, 2024

Sorry I was writting on my phone.

My idea with this is:

If the original holds two %s it would be nice that android2po took care of adding the formatted="false".

from android2po.

miracle2k avatar miracle2k commented on June 26, 2024

I might be willing to implement this as a temporary workaround, if it's needed.

Once android2po is able to correctly copy tag attributes from the original to the language-specific XML files, an auto-detection of "%s %s" wouldn't be needed anymore, since the developer is required to add formatted="false" to his original values/strings.xml file anyway.

from android2po.

Macarse avatar Macarse commented on June 26, 2024

You are right. The developer should have the original strings correctly formatted.

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.