question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix handling multiple origins

See original GitHub issue

Describe the bug When editing PO catalog in some tool that adds it’s own comments and then running extract again, these comments are lost and furthermore, some of them end up badly formatted and make an invalid PO file.

#: src/segments/login/organisms/PasswordLoginForm.tsx:25
#: loco:5b7d94e07ec8ae083b2dae02
msgid "username"
msgstr "username"

After extracting that comment is lost. Furthermore, for obsolete translation, it ends up like this.

#: src/segments/login/organisms/PasswordLoginForm.tsx:24
loco:5b7d94e07ec8ae083b2dae01
#, obsolete
msgid "login.validation.username-missing"
msgstr ""

Expected behavior To keep any custom comments intact and do not break when obsolete translation is encountered.

Additional context

  • jsLingui version: 2.5.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
tricoder42commented, Aug 26, 2018

Well, if I wanted to keep source file origins on single line (#: src/App.js:4, src/Component.js:2, then it would be complicated, but I think it’s not a big deal if each reference is on separate line… So, I didn’t come up with a solution to complex problem, I just simplified the problem 😉

0reactions
tricoder42commented, Aug 31, 2018

Released in v2.6.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access-Control-Allow-Origin Multiple Origin Domains?
Sounds like the recommended way to do it is to have your server read the Origin header from the client, compare that to...
Read more >
Multiple origins in options · Issue #130 · socketio/socket.io
Hi, Could multiple origins be supported in a later version of Socket.IO-node so we may specify either an array of origins or a...
Read more >
Allowing multiple origins in CORS for Apigee proxy
I have a set of proxies being consumed by multiple sites. I have added CORS policy to send below headers to fix CORS...
Read more >
Handling multiple Origins/domains when request is being ...
I have setup cdn.sportsteam.tv and cdn.sportsleague.tv as valid CloudFront CNAME subdomains all running under HTTPS. All of my content is protected using ...
Read more >
【Access-control-allow-origin】multiple domains explained
Access-Control-Allow-Origin is one of the HTTP headers used by Cross-Origin Resource Sharing (CORS) to manage requests between origins (domains) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found