New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up Portuguese messages #5082

Merged
merged 2 commits into from Sep 14, 2017

Conversation

Projects
None yet
4 participants
@victorwss

victorwss commented Sep 6, 2017

Fix up the horrible broken Portuguese translation.

The Portuguese translation of Checkstyle is one of the worst I've seen. The current translation features very badly translated words, very broken and malformed Portuguese grammar and also mixes up inconsistently the Brazilian and European dialects. It is so awful and unreliable that many of the messages reads as utterly useless gibberish in Portuguese and most of the times that I use checkstyle (which sees that Portuguese is my language due to my Locale), for at least some messages, I must check the original English messages to make any sense of them.

I thought about opening up an issue for that. However, I think that a PR is simply more productive. My translation (hopefully) fixes all the bad Portuguese messages. Even if I took one of two of them wrong, they are waaaay better than what it was before.

I standardized them into PT_BR (Brazilian Portuguese), spoken by much more people than the PT_PT one (spoken in Portugal, Angola, Mozambique and a few other countries). I would appreciate to provide a proper PT_PT translation in the near future, using as its starting point the PT_BR one that I'm providing (just a few sentences would need to be rewritten). However, I can't provide one right now.

Here are some of the really bad examples:


Example: Annotation array values cannot contain trailing comma.
How it was translated: Anotação valores de matriz não pode conter fuga vírgula.
What does the translation means in English: Matrix values annotation cannot contain comma run away.
Proposed new translation: A lista de valores de um array de anotações não pode ser terminada em uma vírgula.
Translation back in English of the proposal: The list of values of an annotation array cannot be finished with a comma.


Example: Duplicate {0} tag.
How it was translated: Duplicar {0} tag.
Translating back to English: To duplicate tag {0}.
How it should be interpreted by a programmer in English: Oops, we found the {0} tag duplicated. You should not do that!
How does the translation would be interpreted by a programmer in Portuguese: You should duplicate the tag {0}.

The problem here is that the "duplicate" word which meant to be as an adjective in English was taken as a verb in Portuguese and the result translation was exactly the opposite of what it should be. There weren't enough context in the original message for a reasonable machine translation.

Proposed new translation: A tag {0} não deveria ser duplicada.
Translation back in English of the proposal: The tag {0} should not be duplicated.


Example: Don''t use trailing comments.
How it was translated: Don 't usar arrastando comentários.

Yuck! Here, the sentence is part in English and part in Portuguese. "Don 't" do not means anything at all in Portuguese.

What does the part actually translated in Portuguese means in English: to use dragging comments.
Proposed new translation: Não use comentários no final de linhas.
Translation back in English of the proposal: Do not use comments at line endings.


Example: Must include both @java.lang.Deprecated annotation and @deprecated Javadoc tag with description.
How it was translated: Deve incluir tanto @ anotação java.lang.Deprecated e tag Javadocdeprecated com a descrição.
What does the translation means in English: Must include much @ annotation java.lang.Deprecated and tag Javadocdeprecated with the description.

This translation is particularly awful because one of the @ sign was dropped and other was separated from the annotation name. "Javadocdeprecated" was smashed together into a single word. It also features horribly broken Portuguese grammar.

Proposed new translation: Deveria incluir tanto a anotação @java.lang.Deprecated como a tag @deprecated do Javadoc com a devida descrição.
Translation back in English of the proposal: Should include both the annotation @java.lang.Deprecated just as the @deprecated Javadoc tag with the needed description.


Example: Default should be last label in the switch.
How it was translated: Padrão deve ser a última etiqueta no interruptor.
What does the translation means in English: Pattern must be the last ticket in interrupter.
Proposed new translation: O default deve ser a última entrada no switch.
Translation back in English of the proposal: The default must be the last input in the switch.


Example: String literal expressions should be on the left side of an equals comparison.
How it was translated: Corda expressões literais deve estar no lado esquerdo de um é igual comparação.
What does the translation means in English: Literal expressions rope must be in the left side of a one is equal comparision.

WOW! That awful translation simply makes my eyes bleed!

Proposed new translation: Literais de String deveriam estar no lado esquerdo de comparações feitas com equals.
Translation back in English of the proposal: String literals should be in the left side of comparisons performed with equals.


Example: Throwing ''{0}'' is not allowed.
How it was translated: Jogando ''{0}'' não é permitido.
What does the translation means in English: Playing ''{0}'' is not allowed.
Proposed new translation: Lançar ''{0}'' não é permitido.
Translation back in English of the proposal: Throw ''{0}'' is not allowed.


Example: File match folder pattern ''{0}'' and file pattern ''{1}''.
How it was translated (using the wrong encoding): Arquivo padr�o pasta jogo ''{0}'' e arquivo padr�o ''{1}''.
What does the translation means in English: Standard file folder game ''{0}}'' and standard file ''{1}''.
Proposed new translation: O nome do arquivo condiz com o padrão ''{0}'' para pastas e com o padrão ''{1}'' para arquivos.
Translation back in English of the proposal: The file name matches the pattern ''{0}'' for folders and the pattern ''{1}'' for files.


Example: {0} statement should not be line-wrapped.
How it was translated: {0} afirmação não deve ser linha-embrulhado.
What does the translation means in English: {0} affirmation should not be line-embroiled.
Proposed new translation: A instrução {0} não deveria ser dividida em mais de uma linha.
Translation back in English of the proposal: The instruction {0} should not be splitted into more than one line.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 6, 2017

Member

@victorwss , non of maintainers speak Portuguese, so we filled some gaps in translations by google translator with hope that finally smb come to us and make proper translations.
Thanks a lot for your contribution.

Please change commit message to have prdefix "doc: " or "Pull #5082: " to have reference to this discussion.

Member

romani commented Sep 6, 2017

@victorwss , non of maintainers speak Portuguese, so we filled some gaps in translations by google translator with hope that finally smb come to us and make proper translations.
Thanks a lot for your contribution.

Please change commit message to have prdefix "doc: " or "Pull #5082: " to have reference to this discussion.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 9, 2017

Member

@victorwss , please rebase over our master it should fix some CI problems.
all CI should be green to let me merge PR

Member

romani commented Sep 9, 2017

@victorwss , please rebase over our master it should fix some CI problems.
all CI should be green to let me merge PR

victorwss added a commit to victorwss/checkstyle that referenced this pull request Sep 11, 2017

Pull #5082: Reviewing and rewriting the Portuguese messages in order …
…to allow them to make sense and feature proper Portuguese grammar.
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Sep 11, 2017

Codecov Report

Merging #5082 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #5082   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         294     294           
  Lines       16032   16032           
  Branches     3631    3631           
======================================
  Hits        16032   16032

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update affa9bd...3fc60f3. Read the comment docs.

codecov-io commented Sep 11, 2017

Codecov Report

Merging #5082 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #5082   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         294     294           
  Lines       16032   16032           
  Branches     3631    3631           
======================================
  Hits        16032   16032

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update affa9bd...3fc60f3. Read the comment docs.

@victorwss

This comment has been minimized.

Show comment
Hide comment
@victorwss

victorwss Sep 11, 2017

Seems that I made it wrong, sorry. What should I do? Unpush and uncommit things, rewrite history and redo it all? Or maybe create a new pull request?

victorwss commented Sep 11, 2017

Seems that I made it wrong, sorry. What should I do? Unpush and uncommit things, rewrite history and redo it all? Or maybe create a new pull request?

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Sep 11, 2017

Member

@victorwss Don't delete your current branch. You still your work isolated in commit d285408 .
Create a brand new branch based off the latest master locally, cherry-pick the commit I mentioned, d285408 , onto the new branch and force push that over your old branch on the server, fix-portuguese-messages.

Member

rnveach commented Sep 11, 2017

@victorwss Don't delete your current branch. You still your work isolated in commit d285408 .
Create a brand new branch based off the latest master locally, cherry-pick the commit I mentioned, d285408 , onto the new branch and force push that over your old branch on the server, fix-portuguese-messages.

Victor Williams Stafusa da Silva
Pull #5082: Reviewing and rewriting the Portuguese messages in order …
…to allow them to make sense and feature proper Portuguese grammar
@victorwss

This comment has been minimized.

Show comment
Hide comment
@victorwss

victorwss Sep 13, 2017

I can't see the logs of TeamCity / IDEA Inspections (requires login) nor wercker (gives error 401 - Unauthorized for me). Wercker is still running (edit: finished as ok), but IDEA Inspections failed. What went wrong there?

The others CIs seems to be fine.

victorwss commented Sep 13, 2017

I can't see the logs of TeamCity / IDEA Inspections (requires login) nor wercker (gives error 401 - Unauthorized for me). Wercker is still running (edit: finished as ok), but IDEA Inspections failed. What went wrong there?

The others CIs seems to be fine.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Sep 13, 2017

Member

I can't see the logs of TeamCity / IDEA Inspections (requires login)

There is an option for guest login on the login page you can use that with having to sign up.
Here is what TC says:

src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc
messages_pt.properties (2)
18: Inconsistent property value end '.'
19: Inconsistent property value end '.'

wercker (gives error 401 - Unauthorized for me)

This is a limitation of wercker, it doesn't allow us to give out anonymous access.

Member

rnveach commented Sep 13, 2017

I can't see the logs of TeamCity / IDEA Inspections (requires login)

There is an option for guest login on the login page you can use that with having to sign up.
Here is what TC says:

src/main/resources/com/puppycrawl/tools/checkstyle/checks/javadoc
messages_pt.properties (2)
18: Inconsistent property value end '.'
19: Inconsistent property value end '.'

wercker (gives error 401 - Unauthorized for me)

This is a limitation of wercker, it doesn't allow us to give out anonymous access.

@victorwss

This comment has been minimized.

Show comment
Hide comment
@victorwss

victorwss Sep 13, 2017

18: Inconsistent property value end '.'
19: Inconsistent property value end '.'

Hmm. those lines don't have periods in the English version, but they do have in the Portuguese one. Looking at the messages, some of them are finished with periods and others aren't. Removing those periods is trivial, but out of curiosity, what is the reason why some messages ends with periods while others doesn't?

victorwss commented Sep 13, 2017

18: Inconsistent property value end '.'
19: Inconsistent property value end '.'

Hmm. those lines don't have periods in the English version, but they do have in the Portuguese one. Looking at the messages, some of them are finished with periods and others aren't. Removing those periods is trivial, but out of curiosity, what is the reason why some messages ends with periods while others doesn't?

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Sep 13, 2017

Member

those lines don't have periods in the English version

All of the non-portuguese languages don't end with a period for javadoc.parse.error.

Javadoc comment at column {0} has parse error. Details: {1}
Javadoc comentario en la columna {0} tiene parse error. Detalles: {1}
Le commentaire Javadoc à la colonne {0} ne peut être analysé. Détails : {1}

O comentário Javadoc na coluna {0} tem um erro sintático. Detalhes: {1}.

The check is asking you to remove the period after the {1}.

I assume the original reason for this was the details was a full sentence by itself with a period already, however, going by Issue #5094 this property isn't in use anymore and will be removed.

If a message doesn't end with a : followed by a parameter number, it should end with a period and could be just an oversight.

Member

rnveach commented Sep 13, 2017

those lines don't have periods in the English version

All of the non-portuguese languages don't end with a period for javadoc.parse.error.

Javadoc comment at column {0} has parse error. Details: {1}
Javadoc comentario en la columna {0} tiene parse error. Detalles: {1}
Le commentaire Javadoc à la colonne {0} ne peut être analysé. Détails : {1}

O comentário Javadoc na coluna {0} tem um erro sintático. Detalhes: {1}.

The check is asking you to remove the period after the {1}.

I assume the original reason for this was the details was a full sentence by itself with a period already, however, going by Issue #5094 this property isn't in use anymore and will be removed.

If a message doesn't end with a : followed by a parameter number, it should end with a period and could be just an oversight.

Victor Williams Stafusa da Silva
Pull #5082: Reviewing and rewriting the Portuguese messages in order …
…to allow them to make sense and feature proper Portuguese grammar [fix up bad extra periods]
@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Sep 14, 2017

Member

@victorwss Please squash and keep all commits as 1.
@romani CI is currently passing. I think we can merge this once squashed.

Member

rnveach commented Sep 14, 2017

@victorwss Please squash and keep all commits as 1.
@romani CI is currently passing. I think we can merge this once squashed.

@romani romani merged commit 34f987b into checkstyle:master Sep 14, 2017

9 checks passed

IDEA Inspections Pull Request (Checkstyle) TeamCity build finished
Details
Shippable Run 5101 status is SUCCESS.
Details
codacy/pr Good work! A positive pull request.
Details
codecov/patch Coverage not affected when comparing affa9bd...3fc60f3
Details
codecov/project 100% remains the same compared to affa9bd
Details
continuous-integration/Distelli
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
wercker/build Wercker pipeline passed
Details

romani added a commit that referenced this pull request Sep 14, 2017

Pull #5082: Reviewing and rewriting the Portuguese messages in order …
…to allow them to make sense and feature proper Portuguese grammar
@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 14, 2017

Member

@victorwss , thanks a lot.

Member

romani commented Sep 14, 2017

@victorwss , thanks a lot.

@victorwss

This comment has been minimized.

Show comment
Hide comment
@victorwss

victorwss Sep 14, 2017

@rvneach Well, since this was already been merged, next time I'll try to make it correctly in a single shot.

victorwss commented Sep 14, 2017

@rvneach Well, since this was already been merged, next time I'll try to make it correctly in a single shot.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 14, 2017

Member

if changes in translation trivial, please use commit message prefix "spelling: " to avoid referencing pull number.
Or create an issue on whole Portuguese translation and do changes steps by step(several PRs).

Member

romani commented Sep 14, 2017

if changes in translation trivial, please use commit message prefix "spelling: " to avoid referencing pull number.
Or create an issue on whole Portuguese translation and do changes steps by step(several PRs).

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 14, 2017

Member

what is the reason why some messages ends with periods while others doesn't?

no good reason, all translations come to us from community. Non of current maintainers speak any of non-English languages that we have in localizations.
A lot of them were filled by google translator when we enforced TranslationCheck.
It is community driven are of project, we do not have strict rules there, not now. But probably we need to write Check for this.

Member

romani commented Sep 14, 2017

what is the reason why some messages ends with periods while others doesn't?

no good reason, all translations come to us from community. Non of current maintainers speak any of non-English languages that we have in localizations.
A lot of them were filled by google translator when we enforced TranslationCheck.
It is community driven are of project, we do not have strict rules there, not now. But probably we need to write Check for this.

@romani romani added this to the 8.3 milestone Sep 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment