Skip to content

Implement missing i18n translations for PDF-to-Image modules#565

Open
Skillkiller wants to merge 13 commits intoalam00000:mainfrom
Skillkiller:translate-pdf-to-image
Open

Implement missing i18n translations for PDF-to-Image modules#565
Skillkiller wants to merge 13 commits intoalam00000:mainfrom
Skillkiller:translate-pdf-to-image

Conversation

@Skillkiller
Copy link
Contributor

Description

I noticed that a few spots in the PDF-to-Image modules were still stuck in English, which stands out a bit when you're using the app in another language. To fix this, I’ve hooked up the missing translations for five modules using the existing i18n structure. I added some new keys to common and tools, keeping them organized under their respective namespaces to match how things are currently set up.

Since these modules are quite similar, some of the translations overlap. I did think about grouping everything under a shared pdfToImage key or even refactoring the modules into a single shared component to get rid of the code duplication, as there's definitely a lot of "copy-paste" feel there. I’m totally open to your thoughts on whether you'd like to see that kind of cleanup later!

I also took the chance to fix the same strings in a few other modules I stumbled upon while working on this.

One quick heads-up: My IDE/ESLint went ahead and reformatted src/js/logic/digital-sign-pdf-page.ts and src/js/logic/sign-pdf-page.ts when I committed, which is why the diff for those files looks a bit huge. If that’s annoying or you want to keep this PR strictly about the translations, just let me know—I’m happy to revert the formatting and keep it focused.

Note on Localization

I’ve added the new locale keys for both German and English, as these are the languages I could cover. For the other languages currently supported by the app, I wasn't sure what the preferred workflow is: Should I add the new keys to those JSON files and leave the strings empty (or in English), or is it better to leave them out entirely for now?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

🧪 How Has This Been Tested?

I tested these changes manually by switching the application language and walking through the flow of the affected PDF-to-Image modules. I verified that all previously hardcoded English labels are now correctly replaced by the translated strings and that the fallback to English still works as expected.

Checklist:

  • Verified output manually
  • Tested with relevant sample documents or data
  • Wrote Vite Test Case (if applicable)

Expected Results:
The UI should now dynamically pull all strings from the i18n files instead of using hardcoded English text. When switching the application language, every label within the PDF-to-Image modules and the related shared components should update correctly to the selected language without breaking the layout or causing console errors.

Actual Results:
After implementing the new keys, I confirmed that the translations are being applied as expected. Switching between languages now shows the localized strings in all five modules.

Checklist:

  • I have signed the Contributor License Agreement (CLA) or my organization has signed the Corporate CLA
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

1 participant