meteor-messageformat icon indicating copy to clipboard operation
meteor-messageformat copied to clipboard

Translation interface filters don't work if a translated string is removed

Open monitz87 opened this issue 7 years ago • 3 comments

When the extractor marks a native string as removed, it doesn't do so for any translations of said string. This causes a bug in the interface when using filters because the query that fetches all strings is filtering out the native (removed) string, but not the translations.

This means that when later attempting to match string.file with the filter it crashes because lone translations do not have a file attribute. I have worked around it by adding a function to my startup that marks translations as removed if their respective native string is also marked, but it shouldn't be too hard to fix the extractor to avoid this.

The error itself occurs in meteor-messageformat/packages/ui/lib/client.js, line 245, but the fix should be in the extractor code that marks strings as removed.

Cheers

monitz87 avatar Mar 15 '17 14:03 monitz87

Hi again @monitz87, thanks for reporting this. You're absolutely right. I regret however that unless this bug receives more traction, I probably won't have a chance to get to it before working on the next version. Hope you agree with my priorities.

gadicc avatar May 02 '17 18:05 gadicc

Sure, I'm just doing my part by reporting. I understand that you have your priorities and it's perfectly ok. Maybe I'll get around to fixing it myself and submitting a PR when I find the time.

Cheers

monitz87 avatar May 02 '17 22:05 monitz87

Presumably this is fixed now that f8299544b5f9f492e86b9a68a1502dabd7d6ca87 is merged. It's an UI fix tough, as entries that lack a native translation are simply ignored.

@monitz87 can you check?

sbalmer avatar Oct 16 '17 08:10 sbalmer