Skip to content

docs: pt: add localization for polling-publisher, money, delegation - #3583

Merged
iluwatar merged 1 commit into
iluwatar:masterfrom
zanarellidev:docs-pt-localization-batch1
Aug 25, 2026
Merged

docs: pt: add localization for polling-publisher, money, delegation#3583
iluwatar merged 1 commit into
iluwatar:masterfrom
zanarellidev:docs-pt-localization-batch1

Conversation

@zanarellidev

Copy link
Copy Markdown
Contributor

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.md
  • localization/pt/money/README.md
  • localization/pt/delegation/README.md

This 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 singleton pt
translation, 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.

…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.
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR Summary

Added Brazilian Portuguese translations for three pattern READMEs that previously lacked pt localization: localization/pt/polling-publisher/README.md, localization/pt/money/README.md, and localization/pt/delegation/README.md. The translations follow the wiki convention localization/<lang-code>/<pattern-name>/README.md, reuse the frontmatter and section headers from the existing pt translation (singleton), and preserve code blocks, links, and images from the English sources. This initial translation is AI-assisted and will be reviewed by a native Brazilian Portuguese speaker before final acceptance.

Changes

File Summary
localization/pt/delegation/README.md Adds pt-BR translation of the Delegation pattern README, following existing pt conventions (frontmatter and headers) with preserved code blocks.
localization/pt/money/README.md Adds pt-BR translation of the Money pattern README, preserving structure and code examples while translating prose.
localization/pt/polling-publisher/README.md Adds pt-BR translation of the Polling Publisher-Subscriber pattern README, following localization conventions and preserving diagrams, code blocks, and links.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 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)

Comment on lines +55 to +56
LOGGER.info("Canon Printer : {}", message);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger usage uses the legacy LOGGER name for the HpPrinter. With @slf4j, the logger field is typically 'log'. Update to 'log.info(...)'.

Comment on lines +55 to +58
public Money(double amnt, String curr) {
this.amount = amnt;
this.currency = curr;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +64 to +66
public void addMoney(Money moneyToBeAdded) throws CannotAddTwoCurrienciesException {
if (!moneyToBeAdded.getCurrency().equals(this.currency)) {
throw new CannotAddTwoCurrienciesException("You are trying to add two different currencies");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in exception class name: 'CannotAddTwoCurrienciesException' should be 'CannotAddTwoCurrenciesException'. This typo will cause a compile error if the class doesn't exist.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.61%. Comparing base (22a3412) to head (596eafd).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@iluwatar
iluwatar merged commit c842319 into iluwatar:master Aug 25, 2026
4 checks passed
@iluwatar

Copy link
Copy Markdown
Owner

@all-contributors please add @zanarellidev for translation

@allcontributors

Copy link
Copy Markdown
Contributor

@iluwatar

I've put up a pull request to add @zanarellidev! 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants