Langues backend début

This commit is contained in:
William Nolin 2019-08-23 16:39:11 -04:00
parent ed9053e4f7
commit 68b60acd6d
6 changed files with 42 additions and 27 deletions

View File

@ -18,7 +18,7 @@ public class LocaleConfiguration implements WebMvcConfigurer {
@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:lang/messages");
messageSource.setBasenames("classpath:lang/messages", "classpath:lang/errors");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}

View File

@ -0,0 +1,9 @@
response.1=The quantities of each material used have been deducted from the inventory
response.2=The recipe's informations have been saved
response.3=An error has occurred while saving
response.4=An error has occurred while saving the image
response.5=An error has occurred while saving the SIMDUT file
response.6=Your password is not valid
response.7=Any recipe with the identifier {0} has been found
response.8=Any mix with the identifier {0} has been found
response.9=Any material with the identifier {0} has been found

View File

@ -0,0 +1,9 @@
response.1=Les quantités de chaque produits utilisés ont été déduites de l'inventaire
response.2=Les informations de la recette ont été sauvegardées
response.3=Une erreur est survenue lors de l'enregistrement
response.4=Une erreur est survenue lors de l'enregistrement de l'image
response.5=Une erreur est survenue lors de l'enregistrement du fichier SIMDUT
response.6=Votre mot de passe n'est pas valide
response.7=Aucune recette ayant l'identifiant {0} n'a été trouvée
response.8=Aucun mélange ayant l'identifiant {0} n'a été trouvé
response.9=Aucun produit ayant l'identifiant {0} n'a été trouvé

View File

@ -45,7 +45,8 @@
<td>
<table>
<tr>
<td><label th:for="${#ids.next('company')}" th:text="#{keyword.company} + ':'"></label>
<td><b><label th:for="${#ids.next('company')}"
th:text="#{keyword.company} + ':'"></label></b>
</td>
<td>
<select th:field="*{company}">
@ -58,25 +59,25 @@
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>
<td><label th:for="${#ids.next('recipeDescription')}"
th:text="#{recipe.description} + ':'"></label></td>
<td><b><label th:for="${#ids.next('recipeDescription')}"
th:text="#{recipe.description} + ':'"></label></b></td>
<td><input type="text" th:field="*{recipeDescription}"/></td>
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>
<td><label th:for="${#ids.next('sample')}" th:text="#{recipe.sample} + ':'"></label>
<td><b><label th:for="${#ids.next('sample')}" th:text="#{recipe.sample} + ':'"></label></b>
</td>
<td><input type="number" th:field="*{sample}"/></td>
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>
<td><label th:for="${#ids.next('approbationDate')}"
th:text="#{recipe.approbationDate} + ':'"></label></td>
<td><b><label th:for="${#ids.next('approbationDate')}"
th:text="#{recipe.approbationDate} + ':'"></label></b></td>
<td><input type="date" th:field="*{approbationDate}"/></td>
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>
<td><label th:for="${#ids.next('remark')}" th:text="#{recipe.remark} + ':'"></label>
<td><b><label th:for="${#ids.next('remark')}" th:text="#{recipe.remark} + ':'"></label></b>
</td>
<td><textarea cols="30" rows="10" th:field="*{remark}"></textarea>
</td>
@ -88,11 +89,10 @@
<th:block th:each="mix : ${mixes}">
<tr>
<td>
<p th:text="${mix.mixType.typeName} + ':'"></p>
<b th:text="${mix.mixType.typeName} + ':'"></b>
<th:block th:if="${mix != null}">
<button class="mixEditor" th:data-mixID="${mix.mixID}" type="button">
Modifier
</button>
<button class="mixEditor" th:data-mixID="${mix.mixID}" type="button"
th:text="#{keyword.edit}"></button>
</th:block>
</td>
<td>
@ -128,7 +128,7 @@
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>
<td th:text="#{recipe.steps} + ':'"></td>
<td><b th:text="#{recipe.steps} + ':'"></b></td>
<td>
<table id="steps">
<tr>
@ -143,17 +143,15 @@
</td>
</tr>
<!-- Images -->
<th:block th:each="image : ${images}">
<tr>
<td class="centerTD">
<img alt="Image supprimée ou corrompue" th:src="'/images/' + ${image}" width="400px"/>
</td>
<td>
<button class="deleteImg" th:data-image="${image}" type="button"
th:text="#{keyword.delete}"></button>
</td>
</tr>
</th:block>
<tr th:each="image : ${images}">
<td class="centerTD">
<img alt="Image supprimée ou corrompue" th:src="'/images/' + ${image}" width="400px"/>
</td>
<td>
<button class="deleteImg" th:data-image="${image}" type="button"
th:text="#{keyword.delete}"></button>
</td>
</tr>
<tr>
<td>
<button id="addImg" th:data-recipeID="${recipe.recipeID}" type="button"

View File

@ -60,7 +60,7 @@
<select id="unitsSelect"
onchange="changeUnits(this, '.inventoryQuantity', '.inventoryQuantityUnits'); changeCustomizersUnits(this)">
<option selected value="mL" th:text="#{units.milliliters}"></option>
<option value="L" th:text="#{units.milliliters}"></option>
<option value="L" th:text="#{units.liters}"></option>
<option value="gal" th:text="#{units.gallons}"></option>
</select>
@ -93,8 +93,7 @@
<tr>
<td><b th:text="#{recipe.approbationDate} + ':'"></b></td>
<td th:if="${recipe.approbationDate != ''}" th:text="${recipe.approbationDate}"></td>
<td th:if="${recipe.approbationDate == ''}" th:text="#{recipe.warning.notApproved}"
th:text="#{recipe.warning.notApproved.short}"></td>
<td th:if="${recipe.approbationDate == ''}" th:text="#{recipe.warning.notApproved.short}"></td>
</tr>
<tr th:include="fragments.html :: separator"></tr>
<tr>

Binary file not shown.