diff --git a/TopModel.Generator.Sql/Procedural/AbstractSchemaGenerator.cs b/TopModel.Generator.Sql/Procedural/AbstractSchemaGenerator.cs index b61055ca..667260b5 100644 --- a/TopModel.Generator.Sql/Procedural/AbstractSchemaGenerator.cs +++ b/TopModel.Generator.Sql/Procedural/AbstractSchemaGenerator.cs @@ -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))});"); } } } diff --git a/samples/generators/pg/src/06_resources.sql b/samples/generators/pg/src/06_resources.sql index 2fe0fe67..aaf92ce2 100644 --- a/samples/generators/pg/src/06_resources.sql +++ b/samples/generators/pg/src/06_resources.sql @@ -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');