Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/translatabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
defaultPath: path/to/translation_file.ts # Path to the default translation file
Copy link

Choose a reason for hiding this comment

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

bug (critical): Invalid placeholder path that will cause translatabot to fail

The defaultPath points to path/to/translation_file.ts, which is a placeholder that doesn't exist in the repository. Additionally, this WordPress plugin doesn't use TypeScript (.ts) files.

Proof of issue:

  1. No .ts files exist anywhere in the project structure
  2. WordPress plugins use .pot (Portable Object Template) files for translations, typically located in a languages/ directory
  3. Translatabot will fail immediately when trying to access this non-existent path

Suggested fix:
Replace with the actual path to the plugin's translation template file:

defaultPath: languages/create-block-theme.pot

Or if using a different translation system, point to the actual source translation file used by this project.

Help us improve our suggestions - react with 👍 if it was helpful, 👎 if it needs work

Comment on lines +1 to +2
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

Speculative: The defaultPath key is set to a placeholder value (path/to/translation_file.ts). This configuration file is for an automation tool that will run, likely in CI. If the path does not point to a real, existing translation file within the project's repository, the tool's execution will fail, causing CI to break or translations not to be generated. The placeholder comment indicates the author's intent, but the actual value is not usable.

Suggested change
version: 1
defaultPath: path/to/translation_file.ts # Path to the default translation file
defaultPath: src/languages/en-US.ts

languages:
- relativePath: de.ts # Relative path to the auto-translated file
Copy link

Choose a reason for hiding this comment

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

bug (critical): Invalid placeholder path for German translation file

The relativePath is set to de.ts, which is a placeholder that doesn't match WordPress translation conventions.

Proof of issue:

  1. WordPress plugins use .po (Portable Object) files for translations, not .ts (TypeScript) files
  2. Translation files are typically named with the pattern {textdomain}-{locale}.po (e.g., create-block-theme-de_DE.po)
  3. This path doesn't exist and translatabot will fail when attempting to write to it

Suggested fix:
Replace with the correct WordPress translation file path:

- relativePath: languages/create-block-theme-de_DE.po
  language: German

Ensure the languages/ directory exists and follows WordPress internationalization standards.

Help us improve our suggestions - react with 👍 if it was helpful, 👎 if it needs work

language: German # English name of the language to be translated to.
Comment on lines +3 to +5
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

The configuration defines a single target language (German) with a relativePath of de.ts. This implies the generated translation will be placed at a path relative to the defaultPath. This is a standard pattern. However, there is a potential architectural risk if this file is checked into the repository and subsequently overwritten by a developer's manual edits or by another process, leading to lost changes or merge conflicts. The PR description does not specify the expected workflow (e.g., whether this file is generated, reviewed, and then manually committed, or if it's a build artifact). Without a clear process, this could introduce maintainability issues.