-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Untangling the language files #4529
Comments
I could help with the german translation. It really bothers myself to see the same string technically, but translated in various forms. |
@CronKz I'd be happy to set you as a proofreader of the German CrowdIn stuff. That's sort of a separate issue though - I'm talking more about the file structure of the language files themselves, duplicated entries, etc. Cleaning it up so that it makes it easier for translators to help without wasting their time translating the same string in different sections. If you're interested in being a proofreader (where you can accept/reject translations, add your own, etc), let me know what your CrowdIn username is. |
Are you looking to eliminate duplicate "word for word" translations or translations that include duplicate words like the ones below?
Codewise I like how the translations are structured. Maybe there is a way to update the duplicate translations in the code with a script? What is the process of getting the translations back from Crowdin? |
@RichardBenjamin I'd definitely want to do it via script - no one is that much of a masochist :) Plus anywhere we change the location of the translation, we have to update it everywhere it's references in the functional/blade code. I don't trust myself or any other human enough to get that right by hand. Definitely word-for-word translations (as long as contextually they make sense of course - order meaning to order something vs order meaning an order number, etc) - but also to standardize some of the file structure. Terms that apply to all or most things should all be moved into the root level Do we really need a Re: crowdin, I think I can reorganize the source files and because it already has the existing translations in their DB, it will just re-apply them. I think. |
I'm also interested in consolidating some of the repeated phrases that we can handle via translations with variables. For example: My worry there, other than human fallibility, is that some languages may not translate well that way (I'm thinking of Japanese, where they use different words to quantify small round things than they do to count flat things, etc.) |
I feel like something like https://github.com/highsolutions/laravel-translation-manager is close-but-not-quite for what we need. |
@snipe I've logged into CrowdIn with my Github account. And yes I can do the proof reading for the german translation. |
@snipe What exactly is missing from the translations manager you found (https://github.com/highsolutions/laravel-translation-manager)? I like the idea of storing the translations in the database and generating the language files. If we can get everything into a data model, we can dedupe the translations without a lot of manual work. I could write a script to insert the translations into a database table. In updating the code base, I ran a script and found there a 2368 uses of the translation function: |
@RichardBenjamin namely that it doesn't do any of what we need lol. It could be a replacement for crowdin, but it's really meant for managing+adding translations, not restructuring existing ones.
I mean, as a one-time thing, maybe - but not in perpetuity. How then do I provide those translations to users? How do we handle conflicting ideas of what a translation should be? Etc. Also, there may be some remaining |
@snipe What I've seen so far is that we could make the sentences used more modular to shrink the ammount of strings. For example the sentences in every "message.php". This could be split up into 3 Parts.
So these fields could be used in one "general-messages.php" file. There are plenty of more cases this would apply too. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
@stefanp2021 I think those will be in here (de-DE) or here (de-if). |
Yes but where? I can't seem to find the right string. Thanks. |
@stefanp2021 I'm sorry. I'm thinking about my process of adding new english strings to the application. You'll want to ignore what I said and check out the docs on contributing translations. (My process is different because I'm contributing source code and need to set the original translation strings in english) |
Our language files are a bit of a mess. They work fine, but the directory/file structure was created long before this app got so big, and there are a ton of repeated translations that should be merged into the general translation file. This doesn't affect us much as programmers, but it's unfair to translators who have to translate the same string over and over just because language stuff got out of hand.
I've looked into a few packages that handle Laravel translations, and while many of them are close, I haven't found one that truly de-dupes and reorganizes the way I need.
We don't want everything merged into one file, obviously - no need to load consumable translations when navigating through the assets section (and vice versa), but I'd love to de-dupe the translation files to make the load we put on volunteer translators a little easier. I'm not sure if I have to write a package, or what the best course of action would be here. I'm sure I'm not alone in having an app where the translation structure made sense at the time, but grew much larger than was originally expected.
Looking for ideas, feedback, plans of attack, etc. Please don't just create a giant PR for this without talking to me though - there are thousands of files that would be affected.
The text was updated successfully, but these errors were encountered: