Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Added the name attribute to XLIFF 2 documents#9302
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Nyholm commentedFeb 20, 2018
That is a super valid comment. Fromsymfony/symfony#25758
So my answer is simply just: "but we do it in 1.2, that is why I do it in 2.0". Im not sure what the reasoning were back when 1.2 was made. Im also not sure what would be a good value if the Maybe one could improve the name by somehow slugify and shorten the |
javiereguiluz commentedFeb 20, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I see, it's because of BC compatibility. Thanks! Maybe we could use: |
Nyholm commentedFeb 20, 2018
I would rather do something like: $name =$source;if (strlen($source) >80)) {$name =substr(md5($source), -7);// Why "-7" btw?} |
javiereguiluz commentedFeb 20, 2018
The |
javiereguiluz commentedFeb 21, 2018
Let's merge this "as is" and if we need to change anything in the code, let's discuss about that in a separate issue. Thanks! |
…luz)This PR was merged into the master branch.Discussion----------Added the name attribute to XLIFF 2 documentsThisfixes#9287. It's a simple fix because we only display one XLIFF 2 document in the docs.-----@Nyholm I'm sure you did the right thing ... but just asking: making the `name` value the same as `source` is the best possible solution here? In Symfony's code the `source` attribute is short (https://github.com/symfony/symfony/pull/26149/files) but in real world it can be super long and super ugly (containing `CDATA`, etc.) So, don't you think this will be very verbose? Could we make the `name` value the same as the `id` attribute instead? If the XLIFF standard forces us to do this, then forget my comment and accept my apologies 😄Commits-------30ee49e Added the name attribute to XLIFF 2 documents
…o long for "name" (Nyholm)This PR was merged into the 4.1-dev branch.Discussion----------[Translation] XLIFF2: Make sure to trim source if it is too long for "name"| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |This PR is a follow-up on@javiereguiluz's comment here:symfony/symfony-docs#9302This feature was introduced insymfony/symfony#26149Commits-------ca41fecfd9 Make sure to trim source if it is too long
…o long for "name" (Nyholm)This PR was merged into the 4.1-dev branch.Discussion----------[Translation] XLIFF2: Make sure to trim source if it is too long for "name"| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |This PR is a follow-up on@javiereguiluz's comment here:symfony/symfony-docs#9302This feature was introduced in#26149Commits-------ca41fec Make sure to trim source if it is too long
…o long for "name" (Nyholm)This PR was merged into the 4.1-dev branch.Discussion----------[Translation] XLIFF2: Make sure to trim source if it is too long for "name"| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |This PR is a follow-up on@javiereguiluz's comment here:symfony/symfony-docs#9302This feature was introduced insymfony/symfony#26149Commits-------ca41fecfd9 Make sure to trim source if it is too long
Thisfixes#9287. It's a simple fix because we only display one XLIFF 2 document in the docs.
@Nyholm I'm sure you did the right thing ... but just asking: making the
namevalue the same assourceis the best possible solution here? In Symfony's code thesourceattribute is short (https://github.com/symfony/symfony/pull/26149/files) but in real world it can be super long and super ugly (containingCDATA, etc.) So, don't you think this will be very verbose? Could we make thenamevalue the same as theidattribute instead? If the XLIFF standard forces us to do this, then forget my comment and accept my apologies 😄