Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message: Mismatch in source keys and translation. Keys: 40 Translated Strings: 46 #1

Open
jochemgruter opened this issue Aug 5, 2024 · 4 comments

Comments

@jochemgruter
Copy link

jochemgruter commented Aug 5, 2024

When translating a Dutch language file to Germany, I got the following error (using gpt-4):

An error occurred while processing the file: resources/lang/de/cp.php
Error message: Mismatch in source keys and translation. Keys: 40 Translated Strings: 46

Not sure what to do with this. Seems like something is not working correctly in the project.

My language file has multidimensional arrays. I think this is possibly causing the error.

@cannycookie
Copy link
Collaborator

Hi Jochem, I haven't touched this for while. For some reason your getting 46 translations from 40 lines. Maybe experiment with the file and see if it works in a flat structure?

@injektion
Copy link

injektion commented Nov 12, 2024

using \n in strings breaks things (bumps up the translated strings count)...

@injektion
Copy link

Also, save yourself some headaches and just keep any quotes out of the translation strings. Even with 's the " and ' make translation results disappear...

@injektion
Copy link

Keeps dropping translations and returning corrupted results. Not a reliable package.

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

No branches or pull requests

3 participants