GithubHelp home page GithubHelp logo

Comments (4)

mcka-dev avatar mcka-dev commented on July 17, 2024 1

I got a response from Václav Slavík (Poedit):

You observed a design shortcoming in GNU gettext (not Poedit) which uses whitespace as delimiters for multiple source code references (under the not-entirely-unreasonable assumption of source code using sane paths, i.e. without spaces) as well as a bug in GetText.NET Extractor (PO files’s references are Unix paths, not Windows ones).

There really isn’t anything Poedit can do about it. GNU gettext might, but I suspect they’re opinion would be pragmatic: just don’t use spaces in source code paths, it’s just asking for problems everywhere. And the PO spec is too old and too widespread to be amended to handle this edge case.

Regards, Václav

from gettext.net.

perpetualKid avatar perpetualKid commented on July 17, 2024 1

available in 0.9.7 using commandline paramater -u or --unixstyle

from gettext.net.

perpetualKid avatar perpetualKid commented on July 17, 2024

This seems to be an issue in PoEdit, either style (forward slash or backslash path separator) works well on Windows systems, and PoEdit can open the references just fine even with blanks in the path.

The issue only happends when PoEdit saves the file.

Doesn't even work to quote the path like #: ".\Path with spaces\2.cs":13, PoEdit still breaks on the second reference when saved in PoEdit, but furthermore can't open the path when quoted.

Therefore I'd suggest to open an issue with PoEdit.

If you have a reference or documentation if/how path with blanks shall be quoted, I'm open to adapt, else I see this working well from Extractor-side but somehow failing in PoEdit.

from gettext.net.

perpetualKid avatar perpetualKid commented on July 17, 2024

I'm thinking to make the path separator configurable via command line option, but that wouldn't help anything with spaces in code path. Hence the pragmatical solution as recommended is just to avoid spaces in the source code path.

from gettext.net.

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.