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

Updated Dutch translations #1466

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

evertharmeling
Copy link

@evertharmeling evertharmeling commented Dec 4, 2023

As asked on Slack

  • Ran bin/console translation:extract --force nl command, this caused the major update in the file. But I guess it should be the recommended way to extract the translations.
    • Running the command also added separate security and validators files. If everybody uses the command above it may be logical to add them and have control over them in the demo application. Otherwise we could explicitly not add them as they seemed to be correctly translated already? For now not added the extra generated files, this could be done later on for every language if we decide to.
  • Added missing label.remember_me (for en and nl)

@javiereguiluz
Copy link
Member

Thanks for this. The validators.nl.xlf and security.nl.xlf files look the same as the default Symfony files, right?

I think we should exclude them, but let's wait for more comments about this. Thanks!

@evertharmeling
Copy link
Author

evertharmeling commented Dec 4, 2023

Looking at:

  • default validators.nl.xlf it does not exactly match the one in this PR.
  • default security.nl.xlf also does not exactly match the one in this PR (it's 1 translation off in count, didn't diff it on identifier)

Not sure how it's exactly generated, but maybe good idea to exclude them idd.

@evertharmeling
Copy link
Author

evertharmeling commented Dec 5, 2023

Removed the extra generated files so we can move this PR forward, we could always add those files by running the command again 😊

EDIT: I've also re-extracted the translations for en, so I could make a clean diff on nl vs en translations, those are now in sync and (should be) complete.

EDIT 2: Since the extraction of the translations aren't ordered and this is only supported via the --dump-messages option, the easiest way is to generate 2 outputs bin/console translation:extract --dump-messages <lang> (one for en and your language) and compare which identifiers are missing.

tip: In PHPStorm you may easily diff the files by selecting them and press cmd + d (on mac)

@javiereguiluz
Copy link
Member

Evert, I'm sorry I didn't merge this one yet. The problem is that I'm not comfortable merging it as it is now.

Why? Because all the other translation files use the traditional format, and this PR proposes to change the format but only for NL locale:

<!-- BEFORE -->
<trans-unit id="http_error_500.description">
    <source>http_error_500.description</source>
    <target>Er is een interne serverfout opgetreden.</target>
</trans-unit>

<!-- AFTER -->
<trans-unit id="ZYXSW95" resname="http_error_500.description">
    <source>http_error_500.description</source>
    <target>Er is een interne serverfout opgetreden.</target>
</trans-unit>

I'm not sure the new format is better. E.g. why have a random id value when we already have a unique identifier for each message?

So, what should we do here? Thanks!

@evertharmeling
Copy link
Author

No need to apologize Javier! As in my opinion the 'symfony/demo' project should follow 'best practices' and 'symfony / industry standards'. Therefor I used the bin/console translation:extract command, this resulted in these (big) changes.
So everyone working on the translation files, would generate the same files and this would prevent / decrease future conflicts etc. It also comes with the benefit that files are easier compared if they have the same order / layout, since that was necessary to find the missing translations.

So the fact that the id's are randomised it due to the fact that the translation:extract-command exports them like that, which I guess would be best practice in a project Symfony wise? The id's don't have a real significant value do they?

We could do the following things (and happy to do so):

  1. Drop the use of translation:extract-command and therefor have less changes and update the files manually
  2. Continue this way and create separate commits / PR's to ease the transformation (for other locales).

@javiereguiluz
Copy link
Member

I'm not sure what to do here:

  • Keep translation files using the traditional format
  • Update all translation files with the new format created by translation:extract

Let me ask some folks about what do: @stof and @wouterj Thanks!

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.

2 participants