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.

Suggestion: Replace the placeholder defaultPath with the actual source translation file path (or confirm the placeholder is intentionally correct) so the bot can find the source file. [possible bug]

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.

Suggestion: Make relativePath explicit about the target folder (e.g., include locales/ or src/locales/) so translated files are created in the intended directory. [possible issue]

language: German # English name of the language to be translated to.
Comment on lines +1 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

  • Placeholder Paths: The configuration uses placeholder paths that will prevent Translatabot from functioning correctly. The defaultPath value path/to/translation_file.ts appears to be a template placeholder rather than an actual path to an existing translation file in the repository. Similarly, the output path de.ts doesn't specify a directory location. This will cause the translation bot to fail silently or generate files in incorrect locations.
  • File Extension Mismatch: Speculative: The configuration uses a file extension .ts for translation files, which suggests TypeScript source files rather than standard translation formats (JSON, YAML, etc.). This may indicate either a misunderstanding of translation file conventions or a potential architectural mismatch where translations are embedded in TypeScript code instead of dedicated i18n resource files.
  • Lack of Documentation: The configuration lacks inline documentation about expected file format/structure and doesn't reference Translatabot documentation. Future maintainers may struggle to understand the expected format of translation files or how to add new languages without consulting external documentation.

Code Suggestion:

# Translatabot Configuration
# See: https://docs.translatabot.com/configuration
version: 1
# Source translation file path (JSON format expected)
defaultPath: locales/en.json
languages:
  - relativePath: locales/de.json # Standard JSON translation format
    language: German