FAForever / FAForever/server

Add localization key to notice messages

Aperta
#1,000 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
72
Fork
84
Merge medio
5h 11m
PR unite (30g)
1

Descrizione

Notice messages should also include a localization key so that the client can translate the messages into the correct language. This key should be optional and the client should always be able to fall back to the English `text` field if it receives a notice message with no localization key.

```json
{
"command": "notice",
"style": "info",
"text": "This is some text",
"i18n_key": "some.text.key"
}
```

It probably doesn't make sense to add these keys to the notice messages generated by a `ClientError` as those messages aren't 'supposed to' ever make it to a correctly implemented client. (In practice the protocol isn't quite at the point where that is possible so maybe we want to add this in the future, but lets just start with non `ClientError`s for now.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.