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

[I18N] Fix all instances of incorrect translation syntax #8356

Closed
3 tasks done
robbieaverill opened this issue Sep 3, 2018 · 4 comments
Closed
3 tasks done

[I18N] Fix all instances of incorrect translation syntax #8356

robbieaverill opened this issue Sep 3, 2018 · 4 comments

Comments

@robbieaverill
Copy link
Contributor

robbieaverill commented Sep 3, 2018

Affected Version

SilverStripe 4.x

Description

When running the text collector there are a lot of strings that throw errors and are ignored. We have an open issue to support SomeClass::class syntax in translations, but until that is completed we should fix the existing translations.

Steps to Reproduce

  • Run vendor/bin/sake dev/tasks/i18nTextCollectorTask '' flush=1
  • See a tonne of errors
  • Check and notice that the examples that cause errors don't make it into framework/lang/en.yml as source strings

Pull requests

@robbieaverill
Copy link
Contributor Author

PRs added that fix a relatively vanilla 4.3 install. I'll sanity check the wider CWP modules too.

@robbieaverill
Copy link
Contributor Author

Ok follow up PRs for CWP and Fluent are up.

It'd be nice to display translation errors in a nice way rather than having a screen full of exception stack traces, and also to exit with a non-zero exit code when they happen so that we could put this into CI. I had a brief look at both of these. We can only really get the warning message e.g. "missing translation key for X" but in doing this we lose all of the stack trace context, which is actually more useful in this task. Re: exiting with non-zero exit codes, we can do this too but we also lose the exception context by defining a new error handler.

TL;DR: wait until we have a proper CLI in place, then we can redesign text collection generally. Related: #5542

@sminnee sminnee changed the title Fix all instances of incorrect translation syntax [I18N] Fix all instances of incorrect translation syntax Oct 7, 2018
@kinglozzer
Copy link
Member

PRs all merged, closing as root cause is tracked in #7647

@robbieaverill
Copy link
Contributor Author

Cheers =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants