vslavik / poedit

Translations editor for Mac, Windows and Unix
https://poedit.net
MIT License
1.77k stars 275 forks source link

Linting does not handle `.` being translated as `。` in Chinese #809

Closed mgeisler closed 11 months ago

mgeisler commented 11 months ago

From https://github.com/google/comprehensive-rust/pull/1343#discussion_r1356546003:

If you use Poedit locally, you'll be prompted to make this change, or you'll be warned of an error! @kongy

image
vslavik commented 11 months ago

It's a QA warning, not "error", and your screenshot is contradictory to the subject — you claim that 。is not handled, but the translation in your screenshot does not contain either . or 。... It would be helpful if you could be more clear and ideally provide reproduction samples.

mgeisler commented 11 months ago

Hi @vslavik, thanks for looking!

It's a QA warning, not "error", and your screenshot is contradictory to the subject — you claim that 。is not handled, but the translation in your screenshot does not contain either . or 。... It would be helpful if you could be more clear and ideally provide reproduction samples.

The screenshot is from one of our translators in https://github.com/google/comprehensive-rust/pull/1343#discussion_r1356546003. I think the issue is that they get this warning if they add (you're right that they made a screenshot without or .).

Is there a way to turn off the warning?

SwiftSIQI commented 11 months ago

It's a QA warning, not "error", and your screenshot is contradictory to the subject — you claim that 。is not handled, but the translation in your screenshot does not contain either . or 。... It would be helpful if you could be more clear and ideally provide reproduction samples.

Hi, @vslavik During my working, I found that some warning like this, even I translate my sentence to Chinese, I also need to using English ,, not Chinese, like , so what should i do to avoid this warning?

image

by the way, another question is that the space is really needed or can Poedit ignored?

image

And this case, If we translate this sentence to Chinese, ? will not be the last item, but Poedit think this is not right, what should we do to ignored this warning?

image
vslavik commented 11 months ago

Again, please do provide reproduction files, not some pretty pictures.

Please don't mix up unrelated things together. One issue is for one thing. Please also try using more words, as it's not really comprehensible what exactly is the issue — you incorrectly assume that I speak Chinese. I don't.

Please read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html too. Thanks!

vslavik commented 11 months ago

Is there a way to turn off the warning?

You filed an issue. Your focus should be on improving Poedit, not ignoring things (and the issue tracker really isn't the place to ask for help reading menus). Poedit does handle 。, so again, please do provide non-confusing reproduction file.

SwiftSIQI commented 11 months ago

You can get this file from this link -> zh-CN.po @vslavik

SwiftSIQI commented 11 months ago

OK @vslavik , It's my fault! Let's focus on the main problem, You can see the picture blew, and reproduction this warning using zh-CN.po

image

What I excepted is right

English: Morning: 9:00 - 12:00, Chinese: 早上:9:00 - 12:00,

What Happened Now

English: Morning: 9:00 - 12:00, Chinese: 早上:9:00 - 12:00,

What's wrong with that?

In Chinese sentence, We should use this symbol (comma in Chinese), but Poedit tell me I should use symbol like this ,(comma in English). This is not as expected, because if you use a Chinese translation, you should use all Chinese symbols, right?

mgeisler commented 11 months ago

Hi @vslavik, thanks for the link to the source code! I see that it checks if the language is "zh":

https://github.com/vslavik/poedit/blob/bc014f234817c5692ca7e76f5887deaa8f8a5ab1/src/qa_checks.cpp#L401-L408

When I open our zh-CN.po file which uses Language: zh_CN, I see the warnings @SketchK noticed above.

An example is

#: src/welcome-day-1.md:36
msgid "Morning: 9:00 to 12:00,"
msgstr "早上:9:00 到 12:00,"

where the , and are not seen as equivalent.

I also tried with Language: zh, but I got the same result.

vslavik commented 11 months ago

I see that it checks if the language is "zh"

(And if you red it a big more thoroughly and checked how the value of m_lang is assigned, you would know it is correct.)

In Chinese sentence, We should use this symbol ,(comma in Chinese), but Poedit tell me I should use symbol like this ,(comma in English).

You guys are frustratingly disorganized. You filed an issue about 。being mishandled (it's in the freaking title!). I asked for reproduction case. Instead of providing it, you switched the subject and started talking about ,which is a different character. You also seem to be complaining about whitespace handling — after consulting a native speaker in an attempt to understand what the above could possibly be about, I think I know why, but geez, you sure didn't make it easy.

But the one thing you put in the title is literally not a problem at all as far as I can tell. If you could provide the reproduction file for mishandling of . vs 。which you claimed happens (and which the file provided does not show anywhere), that would be great. But for now I'm assuming it is bogus.

P.S. You can just click the X next to a warning to ignore the false positive.

mgeisler commented 11 months ago

I'm sorry for being unclear! Let us close the issue here for now and then we can open another issue with clear steps to reproduce (if we run into any problems).

vslavik commented 11 months ago

Let us close the issue here for now and then we can open another issue with clear steps to reproduce (if we run into any problems).

Not helpful. If you have reproduction steps for what you claimed is the issue, post them here, not anywhere else.

If you don't, as seems increasingly more likely, please don't do that in the future — verify your findings first, then file the bug. Doing it the other way around just wastes everybody's time.

mgeisler commented 11 months ago

Not helpful. If you have reproduction steps for what you claimed is the issue, post them here, not anywhere else.

Okay, we'll post here if we have new information.