Skip to content

Commit

Permalink
[i18n] Correction
Browse files Browse the repository at this point in the history
Fixes #174
  • Loading branch information
gideruette committed Apr 18, 2024
1 parent aadb67c commit 0e962a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ private void WriteResources(SqlFileWriter writer, Class modelClass)
{
foreach (var val in modelClass.Values)
{
writer.WriteLine(@$"INSERT INTO {_config.ResourcesTableName}(RESOURCE_KEY, LOCALE, LABEL) VALUES({SingleQuote(val.ResourceKey)}, {(string.IsNullOrEmpty(lang) ? "null" : @$"{SingleQuote(lang)}")}, ""{SingleQuote(_translationStore.GetTranslation(val, lang))});");
writer.WriteLine(@$"INSERT INTO {_config.ResourcesTableName}(RESOURCE_KEY, LOCALE, LABEL) VALUES({SingleQuote(val.ResourceKey)}, {(string.IsNullOrEmpty(lang) ? "null" : @$"{SingleQuote(lang)}")}, {SingleQuote(_translationStore.GetTranslation(val, lang))});");
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions samples/generators/pg/src/06_resources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
-- ===========================================================================================

/** Initialisation des traductions des valeurs de la table DROIT **/
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Create', null, "'Création');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Read', null, "'Lecture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Update', null, "'Mise à jour');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Delete', null, "'Suppression');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Create', null, 'Création');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Read', null, 'Lecture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Update', null, 'Mise à jour');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.droit.values.Delete', null, 'Suppression');

/** Initialisation des traductions des valeurs de la table TYPE_DROIT **/
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Read', null, "'Lecture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Write', null, "'Ecriture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Admin', null, "'Administration');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Read', null, 'Lecture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Write', null, 'Ecriture');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.profil.typeDroit.values.Admin', null, 'Administration');

/** Initialisation des traductions des valeurs de la table TYPE_UTILISATEUR **/
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Admin', null, "'Administrateur');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Gestionnaire', null, "'Gestionnaire');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Client', null, "'Client');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Admin', null, 'Administrateur');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Gestionnaire', null, 'Gestionnaire');
INSERT INTO TRANSLATION(RESOURCE_KEY, LOCALE, LABEL) VALUES('securite.utilisateur.typeUtilisateur.values.Client', null, 'Client');

0 comments on commit 0e962a2

Please sign in to comment.