Skip to content

Commit

Permalink
Fix some translations in JS & KO files + reorder translation files (#144
Browse files Browse the repository at this point in the history
)

Authored-by: Matthieu Prigent <matthieu.prigent@smile.fr>
  • Loading branch information
PrigentMatthieu committed Aug 22, 2022
1 parent a8293c3 commit bc423d5
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 113 deletions.
106 changes: 55 additions & 51 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
"Opening Hours","Opening Hours"
"Special Opening Hours","Special Opening Hours"
"%s result(s)","%s result(s)"
"%s shop(s) nearby","%s shop(s) nearby"
"* Required Fields","* Required Fields"
"Above this limit, the list of stores will be not display","Above this limit, the list of stores will be not display"
"Add Special Opening Hours","Add Special Opening Hours"
"Apply for retailers","Apply for retailers"
"Back to results", "Back to results"
"Choose this store","Choose this store"
"City, Zipcode, Department, ...","City, Zipcode, Department, ..."
"Closed (%1)","Closed (%1)"
"Closing soon (%1)","Closing soon (%1)"
"Contact %1","Contact %1"
Home,Home
"Go to Home Page","Go to Home Page"
"Our stores","Our stores"
Contact,Contact
"Thanks for contacting us with your comments and questions. We'll respond to you very soon.","Thanks for contacting us with your comments and questions. We'll respond to you very soon."
"We can't process your request right now. Sorry, that's all we know.","We can't process your request right now. Sorry, that's all we know."
"We are sorry, an error occured when switching retailer.","We are sorry, an error occured when switching retailer."
"Retailer url_key ""%1"" already exists.","Retailer url_key ""%1"" already exists."
"Name cannot be empty","Name cannot be empty"
"Contact form cannot be empty","Contact form cannot be empty"
"Contact mail cannot be empty","Contact mail cannot be empty"
"Unable to validate form","Unable to validate form"
"Unable to retrieve retailer informations","Unable to retrieve retailer informations"
"Geolocalize me","Geolocalize me"
"City, Zipcode, Department, ...","City, Zipcode, Department, ..."
Search,Search
"* Required Fields","* Required Fields"
"Write Us","Write Us"
Name,Name
Email,Email
"Phone Number","Phone Number"
"What’s on your mind?","What’s on your mind?"
Submit,Submit
Telephone,Telephone
Tel,Tel
Fax,Fax
Mail,Mail
"Contact Us","Contact Us"
"Store Address","Store Address"
Go there,Go there
"Choose this store","Choose this store"
Close,Close
Details,Details
"Open Today","Open Today"
"Open Today (%1)","Open Today (%1)"
"Closing soon (%1)","Closing soon (%1)"
"Closed (%1)","Closed (%1)"
Closed,Closed
"Double-click on an opening hour range to delete it.","Double-click on an opening hour range to delete it."
"Find a store ...","Find a store ..."
"Find a store :","Find a store :"
"Geolocalize me","Geolocalize me"
"Go there","Go there"
"Go to Home Page","Go to Home Page"
"Maximum number of visible stores","Maximum number of visible stores"
"My store : %s","My store : %s"
"Name cannot be empty","Name cannot be empty"
"Narrow your search to see store details","Narrow your search to see store details"
"Open Today (%1)","Open Today (%1)"
"Open Today","Open Today"
"Opening Hours","Opening Hours"
"Our stores","Our stores"
"Phone Number","Phone Number"
"Retailer url_key ""%1"" already exists.","Retailer url_key ""%1"" already exists."
"Shop Search","Shop Search"
"Shops nearby", "Shops nearby"
"Special Opening Hours","Special Opening Hours"
"Store Address","Store Address"
"Thanks for contacting us with your comments and questions. We'll respond to you very soon.","Thanks for contacting us with your comments and questions. We'll respond to you very soon."
"today","today"
"Unable to retrieve retailer informations","Unable to retrieve retailer informations"
"Unable to validate form","Unable to validate form"
"until","until"
"View all","View all"
"View Shop Page","View Shop Page"
"We are sorry, an error occured when switching retailer.","We are sorry, an error occured when switching retailer."
"We can't process your request right now. Sorry, that's all we know.","We can't process your request right now. Sorry, that's all we know."
"What’s on your mind?","What’s on your mind?"
"Write Us","Write Us"
Address,Address
Street,Street
Postcode,Postcode
City,City
Close,Close
Closed,Closed
Contact,Contact
Country,Country
Details,Details
Email,Email
Fax,Fax
Home,Home
Latitude,Latitude
Longitude,Longitude
"Find a store :","Find a store :"
"%s result(s)","%s result(s)"
"%s shop(s) nearby","%s shop(s) nearby"
"View all","View all"
"Shop Search","Shop Search"
"View Shop Page","View Shop Page"
"Double-click on an opening hour range to delete it.","Double-click on an opening hour range to delete it."
"Narrow your search to see store details","Narrow your search to see store details"
"Maximum number of visible stores","Maximum number of visible stores"
"Above this limit, the list of stores will be not display","Above this limit, the list of stores will be not display"
"Apply for retailers","Apply for retailers"
"Shops nearby", "Shops nearby"
Mail,Mail
Name,Name
Opened,Opened
Postcode,Postcode
Search,Search
Street,Street
Submit,Submit
Tel,Tel
Telephone,Telephone
106 changes: 55 additions & 51 deletions i18n/fr_FR.csv
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
"Opening Hours","Horaires d'ouverture"
"Special Opening Hours","Horaires exceptionnels"
"%s result(s)","%s résultat(s)"
"%s shop(s) nearby","%s magasin(s) à proximité"
"* Required Fields","* Champs obligatoires"
"Above this limit, the list of stores will be not display","Au-delà de cette limite, la liste des magasins ne sera pas affichée"
"Add Special Opening Hours","Ajouter une heure d'ouverture exceptionnelle"
"Apply for retailers","Appliquer pour les magasins"
"Back to results","Retourner à la liste"
"Choose this store","Choisir ce magasin"
"City, Zipcode, Department, ...","Ville, Code postal, Département ..."
"Closed (%1)","Fermé (%1)"
"Closing soon (%1)","Fermeture imminente (%1)"
"Contact %1","Contacter %1"
Home,Accueil
"Go to Home Page","Aller à la page d'accueil"
"Our stores","Nos magasins"
Contact,Contact
"Thanks for contacting us with your comments and questions. We'll respond to you very soon.","Merci de nous avoir soumis votre question. Nous vous répondrons très bientôt."
"We can't process your request right now. Sorry, that's all we know.","Nous sommes désolés, une erreur s'est produite durant l'envoi du formulaire."
"We are sorry, an error occured when switching retailer.","Nous sommes désolés, une erreur s'est produite durant le choix du magasin."
"Retailer url_key ""%1"" already exists.","La clef d'url ""%1"" existe déjà."
"Name cannot be empty","Le nom ne peut pas être vide"
"Contact form cannot be empty","Le formulaire de contact ne peut pas être laissé vide"
"Contact mail cannot be empty","L'adresse email ne peut pas être vide"
"Unable to validate form","Impossible de valider le formulaire"
"Unable to retrieve retailer informations","Impossible de récupérer les informations du magasin"
"Geolocalize me","Me géolocaliser"
"City, Zipcode, Department, ...","Ville, Code postal, Département ..."
Search,Search
"* Required Fields","* Champs obligatoires"
"Write Us","Nous écrire"
Name,Name
Email,Email
"Phone Number","Numéro de téléphone"
"What’s on your mind?","Que souhaitez-vous nous dire ?"
Submit,Envoyer
Telephone,Téléphone
Tel,Tél
Fax,Fax
Mail,Mail
"Contact Us","Contactez Nous"
"Store Address","Adresse du magasin"
Go there,M’y rendre
"Choose this store","Choisir ce magasin"
Close,Fermer
Details,Détails
"Open Today","Ouvert aujourd'hui"
"Open Today (%1)","Ouvert aujourd'hui (%1)"
"Closing soon (%1)","Fermeture imminente (%1)"
"Closed (%1)","Fermé (%1)"
Closed,Fermé
"Double-click on an opening hour range to delete it.","Double-cliquez sur une tranche horaire pour la supprimer."
"Find a store ...","Trouver un magasin ..."
"Find a store :","Trouver un magasin :"
"Geolocalize me","Me géolocaliser"
"Go there","M’y rendre"
"Go to Home Page","Aller à la page d'accueil"
"Maximum number of visible stores","Nombre maximum de magasins visible"
"My store : %s","Mon magasin : %s"
"Name cannot be empty","Le nom ne peut pas être vide"
"Narrow your search to see store details","Affinez votre recherche pour voir le détail des magasins"
"Open Today (%1)","Ouvert aujourd'hui (%1)"
"Open Today","Ouvert aujourd'hui"
"Opening Hours","Horaires d'ouverture"
"Our stores","Nos magasins"
"Phone Number","Numéro de téléphone"
"Retailer url_key ""%1"" already exists.","La clef d'url ""%1"" existe déjà."
"Shop Search","Localiser un magasin"
"Shops nearby", "Commerces à proximité"
"Special Opening Hours","Horaires exceptionnels"
"Store Address","Adresse du magasin"
"Thanks for contacting us with your comments and questions. We'll respond to you very soon.","Merci de nous avoir soumis votre question. Nous vous répondrons très bientôt."
"today","aujourd'hui"
"Unable to retrieve retailer informations","Impossible de récupérer les informations du magasin"
"Unable to validate form","Impossible de valider le formulaire"
"until","jusqu'à"
"View all","Voir tout"
"View Shop Page","Voir la page du magasin"
"We are sorry, an error occured when switching retailer.","Nous sommes désolés, une erreur s'est produite durant le choix du magasin."
"We can't process your request right now. Sorry, that's all we know.","Nous sommes désolés, une erreur s'est produite durant l'envoi du formulaire."
"What’s on your mind?","Que souhaitez-vous nous dire ?"
"Write Us","Nous écrire"
Address,Adresse
Street,Rue
Postcode,"Code postal"
City,Ville
Close,Fermer
Closed,Fermé
Contact,Contact
Country,Pays
Details,Détails
Email,Email
Fax,Fax
Home,Accueil
Latitude,Latitude
Longitude,Longitude
"Find a store :","Trouver un magasin :"
"%s result(s)","%s résultat(s)"
"%s shop(s) nearby","%s magasin(s) à proximité"
"View all","Voir tout"
"Shop Search","Localiser un magasin"
"View Shop Page","Voir la page du magasin"
"Double-click on an opening hour range to delete it.","Double-cliquez sur une tranche horaire pour la supprimer."
"Narrow your search to see store details","Affinez votre recherche pour voir le détail des magasins"
"Maximum number of visible stores","Nombre maximum de magasins visible"
"Above this limit, the list of stores will be not display","Au-delà de cette limite, la liste des magasins ne sera pas affichée"
"Apply for retailers","Appliquer pour les magasins"
"Shops nearby", "Commerces à proximité"
Mail,Mail
Name,Name
Opened,Ouvert
Postcode,"Code postal"
Search,Search
Street,Rue
Submit,Envoyer
Tel,Tél
Telephone,Téléphone
2 changes: 1 addition & 1 deletion view/frontend/templates/view/map.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $storeName = $block->getStoreName();

<?= /** @noEscape */$block->getChildHtml('setstorelink') ?>

<a class= "back-to-result-btn" href="<?php echo $this->getStoreListUrl(); ?>"><?php echo __('Back to result'); ?></a>
<a class= "back-to-result-btn" href="<?php echo $this->getStoreListUrl(); ?>"><?php echo __('Back to results'); ?></a>
</div>
</div>
</div>
Expand Down
14 changes: 9 additions & 5 deletions view/frontend/web/js/map-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ define([
'ko',
'smile-storelocator-store-collection',
'Smile_StoreLocator/js/model/store/schedule',
'jquery/ui'
'jquery/ui',
'mage/translate'
], function ($, L, ko, MarkersList, Schedule) {
'use strict';

Expand Down Expand Up @@ -199,7 +200,7 @@ define([
isOpen = 'Closed';
statusClass = 'close-shop';
} else {
isOpen = 'Open';
isOpen = 'Opened';
statusClass = 'open-shop';
}
var time = schedule.getTodayCloseTime(isOpen);
Expand All @@ -209,11 +210,14 @@ define([
time = schedule.getTodayCloseTime(isOpen);
isOpen = 'Closed';
}
var html = '<span class="'+ statusClass +'">'+ $.mage.__(isOpen) +'</span>';
if (time) {
html = html + ' - ' + $.mage.__('today') + ' ' + $.mage.__('until') + ' <span>'+ time +'</span>';
}
var openDay = schedule.getDayWhenStoreOpen();
if (!openDay) {
openDay = '';
if (openDay) {
html = html + '<span>'+ $.mage.__(openDay) +'</span>';
}
var html = '<span class="'+ statusClass +'">'+ isOpen +'</span> - today until <span>'+ time +'</span><span>'+ openDay +'</span>';
return html;
},

Expand Down
5 changes: 2 additions & 3 deletions view/frontend/web/js/model/store/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ define(['jquery', 'uiClass', 'moment', 'ko', 'mage/translate', 'mage/dropdown'],
var index = moment(now).format(this.dateFormat);

var result = false;
var openDay = '';
if (this.calendar.hasOwnProperty(index)) {
var exist = this.calendar[index];
if(exist.length == 0){
Expand All @@ -160,7 +159,7 @@ define(['jquery', 'uiClass', 'moment', 'ko', 'mage/translate', 'mage/dropdown'],
exist = this.getNextDayData();
}
if(exist) {
if(isOpen === 'Open') {
if(isOpen === 'Opened') {
var currentStatus = exist[exist.length - 1].end_time;
var currDate = moment(currentStatus, [this.timeFormat]).toDate();
var currDateTime = currDate.getTime();
Expand Down Expand Up @@ -204,7 +203,7 @@ define(['jquery', 'uiClass', 'moment', 'ko', 'mage/translate', 'mage/dropdown'],
i++
}
if (i == 2) {
day = 'tomorrow';
day = $.mage.__('tomorrow');
} else {
day = this.getDayWhenStoreOpen(indexCurrNexDate);
}
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/web/template/retailer/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="fulltext-search-wrapper clearfix" >
<div class="geocoder-wrapper">
<div class="block-title">
<span role="heading" aria-level="1">Search shop</span>
<span role="heading" aria-level="1" data-bind="i18n: 'Shop Search'">Shop Search</span>
</div>
<form class="form" data-bind="submit: searchCurrentPlaces">
<div class="store-search-form">
Expand Down Expand Up @@ -73,7 +73,7 @@
</div>
</div>

<div class="map" data-bind="afterRender: initMap">
<div class="map" data-bind="afterRender: initMap">
<!-- ko if: isShowCopyrightInfo() -->
<div class="copyright-info-wrapper">
<a class="copyright-link" data-bind="attr: { href: getCopyrightLink() }">
Expand Down

0 comments on commit bc423d5

Please sign in to comment.