cuttle icon indicating copy to clipboard operation
cuttle copied to clipboard

[Feature]: Enable translating snackbar errors in homepage

Open Posoroko opened this issue 2 years ago • 4 comments

Feature Summary

Snackbar displays translated errors

Detailed Description

We need to make sure all errors on the homepage are translated to the user's selected language.

image as you can see, the text about Discord is in French, but the error is in English.

I found these three error messages: (but we need to check if other messages exist.) 'Game name cannot exceed 50 characters.' 'Game name cannot be blank' 'You are not permitted to perform this action.'

First we need to create an entry in the en.json file:

{
    "home": {
        "snackbar": {
            "nameExceed50": "Game name cannot exceed 50 characters.",
            "gameNameIsBlank": "Game name cannot be blank.",
            "notPermited": "You are not permitted to perform this action."
        }
    }
}

Then, we need to make sure the server sends a key to these error messages instead of a string of text. This is handled by api/policies/hasGameName.js

Finally, we need to implement the localization for the BaseSnackbar module in HomeView.vue.

Posoroko avatar Nov 12 '23 11:11 Posoroko

I'll grab this one 👍

Haviles04 avatar Nov 12 '23 19:11 Haviles04

@Haviles04 have you begun working on this ? I did, but would like to have some feedback

Posoroko avatar Nov 14 '23 15:11 Posoroko

@Haviles04 have you begun working on this ? I did, but would like to have some feedback

I did not start on this yet, you can go 👍

Haviles04 avatar Nov 14 '23 15:11 Haviles04

@Haviles04 have you begun working on this ? I did, but would like to have some feedback

I did not start on this yet, you can go 👍

okay !

Posoroko avatar Nov 14 '23 15:11 Posoroko