Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Replace server-side hard-coded English error messages #79

Open
elisee opened this issue Jan 23, 2016 · 2 comments
Open

Replace server-side hard-coded English error messages #79

elisee opened this issue Jan 23, 2016 · 2 comments

Comments

@elisee
Copy link
Contributor

elisee commented Jan 23, 2016

Both in superpowers and superpowers-game, we have various error messages sent by the server through callbacks that haven't been internationalized.

A couple examples:

They should be replaced by localization IDs ("namespace:some.key"), added to the locale files and the client should run the IDs through SupClient.i18n.t(...). Even better, it should enclose them in a descriptive string like Could not create project: ${reason} which should itself be locazlized.

The localized reasons should be full sentences (maybe multiple) so they should end with a full stop.

@elisee
Copy link
Contributor Author

elisee commented Jan 23, 2016

Hmm, how do we deal with variable interpolation like here, since the localization happens on the client?

We should probably replace err: string with something like err: SupCore.LocalizedError and give it a constructor like new SupCore.LocalizedError("sceneEditor:errors.invalidActorId", { id }).

@elisee
Copy link
Contributor Author

elisee commented Jan 23, 2016

Started things off by adding the SupCore.LocalizedError class: caa6606

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

No branches or pull requests

1 participant