Skip to content

feat: Add Bengali YAML translations#127

Merged
brunoborges merged 5 commits intojavaevolved:mainfrom
rokon12:bengali-translations
Mar 2, 2026
Merged

feat: Add Bengali YAML translations#127
brunoborges merged 5 commits intojavaevolved:mainfrom
rokon12:bengali-translations

Conversation

@rokon12
Copy link
Copy Markdown
Contributor

@rokon12 rokon12 commented Mar 2, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Bengali (bn) localization support to the static site by introducing Bengali UI strings and Bengali translations for a large set of patterns, and registering the locale so the generators can produce site/bn/** output.

Changes:

  • Added Bengali UI strings (translations/strings/bn.yaml).
  • Added Bengali translated pattern content for multiple categories under translations/content/bn/**.
  • Registered bn in html-generators/locales.properties.

Reviewed changes

Copilot reviewed 114 out of 114 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
translations/strings/bn.yaml Adds Bengali UI strings for templates and site chrome.
translations/content/bn/tooling/single-file-execution.yaml Adds Bengali translation for the “single-file execution” pattern.
translations/content/bn/tooling/multi-file-source.yaml Adds Bengali translation for the “multi-file source launcher” pattern.
translations/content/bn/tooling/junit6-with-jspecify.yaml Adds Bengali translation for the “JUnit 6 + JSpecify” pattern.
translations/content/bn/tooling/jshell-prototyping.yaml Adds Bengali translation for the “JShell prototyping” pattern.
translations/content/bn/tooling/jfr-profiling.yaml Adds Bengali translation for the “JFR profiling” pattern.
translations/content/bn/tooling/compact-object-headers.yaml Adds Bengali translation for the “compact object headers” pattern.
translations/content/bn/tooling/built-in-http-server.yaml Adds Bengali translation for the “built-in HTTP server” pattern.
translations/content/bn/tooling/aot-class-preloading.yaml Adds Bengali translation for the “AOT class preloading” pattern.
translations/content/bn/strings/string-strip.yaml Adds Bengali translation for the String.strip() pattern.
translations/content/bn/strings/string-repeat.yaml Adds Bengali translation for the String.repeat() pattern.
translations/content/bn/strings/string-lines.yaml Adds Bengali translation for the String.lines() pattern.
translations/content/bn/strings/string-isblank.yaml Adds Bengali translation for the String.isBlank() pattern.
translations/content/bn/strings/string-indent-transform.yaml Adds Bengali translation for the String.indent()/transform() pattern.
translations/content/bn/strings/string-formatted.yaml Adds Bengali translation for the String.formatted() pattern.
translations/content/bn/strings/string-chars-stream.yaml Adds Bengali translation for the “String chars as stream” pattern.
translations/content/bn/streams/virtual-thread-executor.yaml Adds Bengali translation for the “virtual thread executor” pattern.
translations/content/bn/streams/stream-tolist.yaml Adds Bengali translation for the Stream.toList() pattern.
translations/content/bn/streams/stream-takewhile-dropwhile.yaml Adds Bengali translation for the takeWhile/dropWhile pattern.
translations/content/bn/streams/stream-of-nullable.yaml Adds Bengali translation for the Stream.ofNullable() pattern.
translations/content/bn/streams/stream-mapmulti.yaml Adds Bengali translation for the Stream.mapMulti() pattern.
translations/content/bn/streams/stream-iterate-predicate.yaml Adds Bengali translation for the predicate Stream.iterate() pattern.
translations/content/bn/streams/stream-gatherers.yaml Adds Bengali translation for the “Stream gatherers” pattern.
translations/content/bn/streams/predicate-not.yaml Adds Bengali translation for the Predicate.not() pattern.
translations/content/bn/streams/optional-or.yaml Adds Bengali translation for the Optional.or() pattern.
translations/content/bn/streams/optional-ifpresentorelse.yaml Adds Bengali translation for the Optional.ifPresentOrElse() pattern.
translations/content/bn/streams/collectors-flatmapping.yaml Adds Bengali translation for the Collectors.flatMapping() pattern.
translations/content/bn/security/tls-default.yaml Adds Bengali translation for the “TLS 1.3 by default” pattern.
translations/content/bn/security/strong-random.yaml Adds Bengali translation for the “strong random generation” pattern.
translations/content/bn/security/random-generator.yaml Adds Bengali translation for the RandomGenerator pattern.
translations/content/bn/security/pem-encoding.yaml Adds Bengali translation for the “PEM encoding/decoding” pattern.
translations/content/bn/security/key-derivation-functions.yaml Adds Bengali translation for the “KDF API” pattern.
translations/content/bn/language/unnamed-variables.yaml Adds Bengali translation for the “unnamed variables with _” pattern.
translations/content/bn/language/type-inference-with-var.yaml Adds Bengali translation for the “type inference with var” pattern.
translations/content/bn/language/text-blocks-for-multiline-strings.yaml Adds Bengali translation for the “text blocks” pattern.
translations/content/bn/language/switch-expressions.yaml Adds Bengali translation for the “switch expressions” pattern.
translations/content/bn/language/static-methods-in-interfaces.yaml Adds Bengali translation for the “static methods in interfaces” pattern.
translations/content/bn/language/static-members-in-inner-classes.yaml Adds Bengali translation for the “static members in inner classes” pattern.
translations/content/bn/language/sealed-classes.yaml Adds Bengali translation for the “sealed classes” pattern.
translations/content/bn/language/records-for-data-classes.yaml Adds Bengali translation for the “records for data classes” pattern.
translations/content/bn/language/record-patterns.yaml Adds Bengali translation for the “record patterns” pattern.
translations/content/bn/language/private-interface-methods.yaml Adds Bengali translation for the “private interface methods” pattern.
translations/content/bn/language/primitive-types-in-patterns.yaml Adds Bengali translation for the “primitive patterns” pattern.
translations/content/bn/language/pattern-matching-switch.yaml Adds Bengali translation for the “pattern matching in switch” pattern.
translations/content/bn/language/pattern-matching-instanceof.yaml Adds Bengali translation for the “pattern matching for instanceof” pattern.
translations/content/bn/language/module-import-declarations.yaml Adds Bengali translation for the “module import declarations” pattern.
translations/content/bn/language/markdown-javadoc-comments.yaml Adds Bengali translation for the “Markdown in Javadoc comments” pattern.
translations/content/bn/language/guarded-patterns.yaml Adds Bengali translation for the “guarded patterns with when” pattern.
translations/content/bn/language/flexible-constructor-bodies.yaml Adds Bengali translation for the “flexible constructor bodies” pattern.
translations/content/bn/language/exhaustive-switch.yaml Adds Bengali translation for the “exhaustive switch without default” pattern.
translations/content/bn/language/diamond-operator.yaml Adds Bengali translation for the “diamond with anonymous classes” pattern.
translations/content/bn/language/default-interface-methods.yaml Adds Bengali translation for the “default interface methods” pattern.
translations/content/bn/language/compact-source-files.yaml Adds Bengali translation for the “compact source files” pattern.
translations/content/bn/language/compact-canonical-constructor.yaml Adds Bengali translation for the “compact canonical constructor” pattern.
translations/content/bn/io/writing-files.yaml Adds Bengali translation for the “writing files” pattern.
translations/content/bn/io/try-with-resources-effectively-final.yaml Adds Bengali translation for the “try-with-resources improvement” pattern.
translations/content/bn/io/reading-files.yaml Adds Bengali translation for the “reading files” pattern.
translations/content/bn/io/path-of.yaml Adds Bengali translation for the Path.of() pattern.
translations/content/bn/io/io-class-console-io.yaml Adds Bengali translation for the java.io.IO console I/O pattern.
translations/content/bn/io/inputstream-transferto.yaml Adds Bengali translation for the InputStream.transferTo() pattern.
translations/content/bn/io/http-client.yaml Adds Bengali translation for the “modern HTTP client” pattern.
translations/content/bn/io/files-mismatch.yaml Adds Bengali translation for the Files.mismatch() pattern.
translations/content/bn/io/file-memory-mapping.yaml Adds Bengali translation for the “file memory mapping” pattern.
translations/content/bn/io/deserialization-filters.yaml Adds Bengali translation for the “deserialization filters” pattern.
translations/content/bn/errors/require-nonnull-else.yaml Adds Bengali translation for the Objects.requireNonNullElse() pattern.
translations/content/bn/errors/record-based-errors.yaml Adds Bengali translation for the “record-based error responses” pattern.
translations/content/bn/errors/optional-orelsethrow.yaml Adds Bengali translation for the no-arg Optional.orElseThrow() pattern.
translations/content/bn/errors/optional-chaining.yaml Adds Bengali translation for the “optional chaining” pattern.
translations/content/bn/errors/null-in-switch.yaml Adds Bengali translation for the “null case in switch” pattern.
translations/content/bn/errors/multi-catch.yaml Adds Bengali translation for the “multi-catch” pattern.
translations/content/bn/errors/helpful-npe.yaml Adds Bengali translation for the “helpful NPEs” pattern.
translations/content/bn/enterprise/spring-xml-config-vs-annotations.yaml Adds Bengali translation for the “Spring XML vs annotations” pattern.
translations/content/bn/enterprise/spring-null-safety-jspecify.yaml Adds Bengali translation for the “Spring null safety with JSpecify” pattern.
translations/content/bn/enterprise/spring-api-versioning.yaml Adds Bengali translation for the “Spring API versioning” pattern.
translations/content/bn/enterprise/soap-vs-jakarta-rest.yaml Adds Bengali translation for the “SOAP vs Jakarta REST” pattern.
translations/content/bn/enterprise/singleton-ejb-vs-cdi-application-scoped.yaml Adds Bengali translation for the “Singleton EJB vs CDI @ApplicationScoped” pattern.
translations/content/bn/enterprise/servlet-vs-jaxrs.yaml Adds Bengali translation for the “Servlet vs JAX-RS” pattern.
translations/content/bn/enterprise/mdb-vs-reactive-messaging.yaml Adds Bengali translation for the “MDB vs reactive messaging” pattern.
translations/content/bn/enterprise/manual-transaction-vs-declarative.yaml Adds Bengali translation for the “manual transaction vs @transactional” pattern.
translations/content/bn/enterprise/jsf-managed-bean-vs-cdi-named.yaml Adds Bengali translation for the “JSF @ManagedBean vs CDI @nAmed” pattern.
translations/content/bn/enterprise/jpa-vs-jakarta-data.yaml Adds Bengali translation for the “JPA vs Jakarta Data” pattern.
translations/content/bn/enterprise/jndi-lookup-vs-cdi-injection.yaml Adds Bengali translation for the “JNDI lookup vs CDI injection” pattern.
translations/content/bn/enterprise/jdbc-vs-jpa.yaml Adds Bengali translation for the “JDBC vs JPA” pattern.
translations/content/bn/enterprise/jdbc-vs-jooq.yaml Adds Bengali translation for the “JDBC vs jOOQ” pattern.
translations/content/bn/enterprise/jdbc-resultset-vs-jpa-criteria.yaml Adds Bengali translation for the “ResultSet mapping vs Criteria API” pattern.
translations/content/bn/enterprise/ejb-vs-cdi.yaml Adds Bengali translation for the “EJB vs CDI” pattern.
translations/content/bn/enterprise/ejb-timer-vs-jakarta-scheduler.yaml Adds Bengali translation for the “EJB timer vs Jakarta scheduler” pattern.
translations/content/bn/datetime/math-clamp.yaml Adds Bengali translation for the Math.clamp() pattern.
translations/content/bn/datetime/java-time-basics.yaml Adds Bengali translation for “java.time basics”.
translations/content/bn/datetime/instant-precision.yaml Adds Bengali translation for the “Instant precision” pattern.
translations/content/bn/datetime/hex-format.yaml Adds Bengali translation for the HexFormat pattern.
translations/content/bn/datetime/duration-and-period.yaml Adds Bengali translation for the “Duration vs Period” pattern.
translations/content/bn/datetime/date-formatting.yaml Adds Bengali translation for the “date formatting” pattern.
translations/content/bn/concurrency/virtual-threads.yaml Adds Bengali translation for the “virtual threads” pattern.
translations/content/bn/concurrency/thread-sleep-duration.yaml Adds Bengali translation for the Thread.sleep(Duration) pattern.
translations/content/bn/concurrency/structured-concurrency.yaml Adds Bengali translation for the “structured concurrency” pattern.
translations/content/bn/concurrency/stable-values.yaml Adds Bengali translation for the “stable values” pattern.
translations/content/bn/concurrency/scoped-values.yaml Adds Bengali translation for the “scoped values” pattern.
translations/content/bn/concurrency/process-api.yaml Adds Bengali translation for the “modern process API” pattern.
translations/content/bn/concurrency/lock-free-lazy-init.yaml Adds Bengali translation for the “lock-free lazy init” pattern.
translations/content/bn/concurrency/executor-try-with-resources.yaml Adds Bengali translation for the “ExecutorService auto-close” pattern.
translations/content/bn/concurrency/concurrent-http-virtual.yaml Adds Bengali translation for the “concurrent HTTP with virtual threads” pattern.
translations/content/bn/concurrency/completablefuture-chaining.yaml Adds Bengali translation for the “CompletableFuture chaining” pattern.
translations/content/bn/collections/unmodifiable-collectors.yaml Adds Bengali translation for the “unmodifiable collectors / toList” pattern.
translations/content/bn/collections/stream-toarray-typed.yaml Adds Bengali translation for the “typed Stream.toArray” pattern.
translations/content/bn/collections/sequenced-collections.yaml Adds Bengali translation for the “sequenced collections” pattern.
translations/content/bn/collections/reverse-list-iteration.yaml Adds Bengali translation for the “reverse list iteration” pattern.
translations/content/bn/collections/map-entry-factory.yaml Adds Bengali translation for the Map.entry() pattern.
translations/content/bn/collections/immutable-set-creation.yaml Adds Bengali translation for the Set.of() pattern.
translations/content/bn/collections/immutable-map-creation.yaml Adds Bengali translation for the Map.of() pattern.
translations/content/bn/collections/immutable-list-creation.yaml Adds Bengali translation for the List.of() pattern.
translations/content/bn/collections/copying-collections-immutably.yaml Adds Bengali translation for the copyOf() collections pattern.
translations/content/bn/collections/collectors-teeing.yaml Adds Bengali translation for the Collectors.teeing() pattern.
html-generators/locales.properties Registers bn locale for generation and language selection.
Comments suppressed due to low confidence (2)

translations/strings/bn.yaml:33

  • filters.jdk and filters.category are present in translations/strings/en.yaml and are used in templates/index.html, but they are missing here. This will cause English fallback (and warnings) in the Bengali index page filter dropdown labels. Add Bengali translations for these keys under filters:.
    translations/strings/bn.yaml:50
  • cards.learnMore is used in templates/index-card.html but is missing from this locale file, so the Bengali homepage cards will fall back to English for that label. Add a Bengali translation for cards.learnMore to avoid mixed-language UI.

@brunoborges
Copy link
Copy Markdown
Member

Great PR, @rokon12!

Can you please fix the issues that Copilot found?

@rokon12 rokon12 force-pushed the bengali-translations branch from 278aa66 to 4917cd7 Compare March 2, 2026 11:10
@rokon12 rokon12 force-pushed the bengali-translations branch from 42a420a to 7ac295b Compare March 2, 2026 11:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 114 out of 114 changed files in this pull request and generated 1 comment.

Comment on lines +1 to +10
tagline: জাভাতে এসেছে নতুন দিগন্ত, আপনার কোডও হোক প্রাণবন্ত
tagline_line1: জাভাতে এসেছে নতুন দিগন্ত,
tagline_line2: আপনার কোডও হোক প্রাণবন্ত।
description: আধুনিক Java কোড স্নিপেটের একটি সংগ্রহ। পুরনো Java প্যাটার্নের পাশে তার পরিষ্কার, আধুনিক বিকল্প।
heroSnippetCount: ✦ {{snippetCount}} আধুনিক প্যাটার্ন · Java 8 → Java 25
heroOld: পুরনো
heroModern: আধুনিক
allComparisons: সব তুলনা
snippetsBadge: '{{snippetCount}} স্নিপেট'
nav:
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The UI strings file structure doesn’t match the other locales: it’s missing the top-level site: mapping, so keys like tagline, description, heroSnippetCount, etc. won’t be found via the expected site.* paths. The current leading indentation also suggests these entries were intended to be nested under site:.

Update this file to follow the same shape as translations/strings/en.yaml (e.g., add site: and move/indent these fields under it) so the generator/template lookups resolve correctly.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rokon12 still a minor issue here.

Add top-level site: key to match the structure of other locale files,
ensuring template lookups like site.tagline resolve correctly.
@rokon12 rokon12 requested a review from brunoborges March 2, 2026 18:08
@brunoborges brunoborges merged commit dc4738e into javaevolved:main Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants