Coder Social home page Coder Social logo

%s in translations about persolootroll HOT 2 CLOSED

shrugal avatar shrugal commented on June 22, 2024
%s in translations

from persolootroll.

Comments (2)

shrugal avatar shrugal commented on June 22, 2024

I feared that this might come up at some point. The bad news is that LUA's string:format function doesn't support reordering the arguments, but I think there are easy workarounds for this, so I'll investigate them as soon as I have the time.

So yes, if there is no way around reordering the arguments then please do so, using #$ between the % and the s or d (so e.g. %1$s instead of %s or %3$d instead of %d). Of course I'll only be able to add those translations after the reordering feature is implemented.

Thanks for your translation efforts btw! 😃

from persolootroll.

shrugal avatar shrugal commented on June 22, 2024

Ok never mind, implementing this was way easier than expected! It will be in the next version, so go ahead and reorder those translations however you like! One important thing is that you can't mix placeholder with and without position, so "%s %s" and "%2$s %1$s" are both fine, but "%2$s %s" won't work.

from persolootroll.

Related Issues (6)

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.