docs: pt: add localization for polling-publisher, money, delegation - #3583
Conversation
…atterns Add Brazilian Portuguese (pt) translations for three previously untranslated pattern READMEs, following the existing localization/pt/ convention documented in the wiki (15. Support for multiple languages). Frontmatter and section headers follow the same structure used by the most recently updated existing translation (singleton), keeping code blocks, links, and image references unchanged from the English source.
PR SummaryAdded Brazilian Portuguese translations for three pattern READMEs that previously lacked pt localization: Changes
autogenerated by presubmit.ai |
There was a problem hiding this comment.
🚨 Pull request needs attention.
Review Summary
Commits Considered (1)
- 596eafd: docs: pt: add localization for polling-publisher, money, delegation patterns
Add Brazilian Portuguese (pt) translations for three previously
untranslated pattern READMEs, following the existing localization/pt/
convention documented in the wiki (15. Support for multiple languages).
Frontmatter and section headers follow the same structure used by the
most recently updated existing translation (singleton), keeping code
blocks, links, and image references unchanged from the English source.
Files Processed (3)
- localization/pt/delegation/README.md (1 hunk)
- localization/pt/money/README.md (1 hunk)
- localization/pt/polling-publisher/README.md (1 hunk)
Actionable Comments (5)
-
localization/pt/delegation/README.md [55-56]
bug: "Logger name mismatch with Lombok annotation."
-
localization/pt/delegation/README.md [64-64]
bug: "Logger name mismatch with Lombok annotation."
-
localization/pt/delegation/README.md [72-72]
bug: "Logger name mismatch with Lombok annotation."
-
localization/pt/money/README.md [55-58]
bug: "Constructor duplication with Lombok annotations."
-
localization/pt/money/README.md [64-66]
bug: "Typo in exception class name."
Skipped Comments (0)
| LOGGER.info("Canon Printer : {}", message); | ||
| } |
There was a problem hiding this comment.
Logger is not defined with Lombok's @slf4j annotation; Lombok exposes a logger named log by default. Using LOGGER will fail to compile. Update to use log (e.g., log.info(...)).
| @Override | ||
| public void print(String message) { | ||
| LOGGER.info("Epson Printer : {}", message); | ||
| } |
There was a problem hiding this comment.
Logger usage uses the legacy LOGGER name for the EpsonPrinter. With @slf4j, the logger field is typically 'log'. Update to 'log.info(...)'.
| @Override | ||
| public void print(String message) { | ||
| LOGGER.info("HP Printer : {}", message); | ||
| } |
There was a problem hiding this comment.
Logger usage uses the legacy LOGGER name for the HpPrinter. With @slf4j, the logger field is typically 'log'. Update to 'log.info(...)'.
| public Money(double amnt, String curr) { | ||
| this.amount = amnt; | ||
| this.currency = curr; | ||
| } |
There was a problem hiding this comment.
Manual constructor is defined alongside @AllArgsConstructor. Lombok will also generate an all-args constructor, leading to a duplicate constructor and a compile error. Remove either the manual constructor or the @AllArgsConstructor.
| public void addMoney(Money moneyToBeAdded) throws CannotAddTwoCurrienciesException { | ||
| if (!moneyToBeAdded.getCurrency().equals(this.currency)) { | ||
| throw new CannotAddTwoCurrienciesException("You are trying to add two different currencies"); |
There was a problem hiding this comment.
Typo in exception class name: 'CannotAddTwoCurrienciesException' should be 'CannotAddTwoCurrenciesException'. This typo will cause a compile error if the class doesn't exist.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3583 +/- ##
============================================
+ Coverage 83.54% 83.61% +0.07%
- Complexity 4212 4215 +3
============================================
Files 1107 1107
Lines 14907 14907
Branches 704 704
============================================
+ Hits 12454 12465 +11
+ Misses 2160 2153 -7
+ Partials 293 289 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@all-contributors please add @zanarellidev for translation |
|
I've put up a pull request to add @zanarellidev! 🎉 |
What does this PR do?
Adds Brazilian Portuguese (pt) translations for three pattern READMEs
that currently have no pt localization:
localization/pt/polling-publisher/README.mdlocalization/pt/money/README.mdlocalization/pt/delegation/README.mdThis follows the directory convention described on the wiki page
"15. Support for multiple languages"
(
localization/<lang-code>/<pattern-name>/README.md). Only 10 of the~186 pattern directories currently have a pt translation
(abstract-factory, active-object, adapter, builder, caching,
chain-of-responsability, facade, factory, proxy, singleton); this PR adds
three more.
Frontmatter and section-header structure follow the
singletonpttranslation, the only existing pt file that matches the current English
README format (the other 9 existing pt files predate a later rewrite of
the English READMEs). Code blocks, links, and image references are
unchanged from the English source; only prose was translated.
Disclosure: this translation was produced with AI assistance and is
pending review by a native Brazilian Portuguese speaker before it should
be considered final. I (the PR author) will review the wording myself
while this is under maintainer review. Flagging this now so reviewers
can weigh it accordingly, since it has not yet had a human pt-BR review
pass.