Fix About page crashing when instance language is not supported

Use the languages defined by CLDR on server instead, and fallback to
english if not defined

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-02 11:22:54 +01:00
parent 05a3160685
commit 9540a486ec
4 changed files with 46 additions and 2 deletions

View File

@@ -128,6 +128,15 @@ export const LANGUAGES = gql`
}
`;
export const LANGUAGES_CODES = gql`
query LanguagesCodes($codes: [String!]) {
languages(codes: $codes) {
code
name
}
}
`;
export const ADMIN_SETTINGS_FRAGMENT = gql`
fragment adminSettingsFragment on AdminSettings {
instanceName