-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translated everything in English (going worldwide)
- Loading branch information
1 parent
586ef7e
commit 44d9c0a
Showing
9 changed files
with
546 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- | ||
name: Informations d'une enseigne | ||
about: Ouverture ou fermeture d'une enseigne | ||
title: Nom de l'enseigne concernée | ||
name: Brand information | ||
about: Opening or closing status of a chain | ||
title: Chain store name | ||
labels: enseigne | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Merci de remplir les champs ci-dessous | ||
Thanks for adding your information below | ||
--> | ||
|
||
* __Magasins concernés__ : <!-- nom de l'enseigne --> | ||
* __Règle d'ouverture__ : <!-- magasins fermés / magasins ouverts aux horaires habituels / magasins ouverts à des horaires spéciales (précisez : sur RDV, horaires d'ouvertures...)--> | ||
* __Wikipédia/Wikidata__ : <!-- (optionel) lien URL vers l'enseigne sur Wikipédia (ou idéalement [Wikidata](https://www.wikidata.org/)) --> | ||
* __Horaires__ : <!-- (optionel) lien URL vers la page recensant les horaires actualisés --> | ||
* __Source__ : <!-- l'adresse où vous avez constaté l'info --> | ||
* __Brand__ : <!-- brand name of concerned shops --> | ||
* __Opening rule__ : <!-- shops closed / shops open as usual / shops open with adapted opening hours (give some details : on appointment, only by delivery...) --> | ||
* __Wikipedia / Wikidata__ : <!-- (optional) URL to Wikipedia or [Wikidata](https://www.wikidata.org/) page --> | ||
* __Opening hours__ : <!-- (optional) URL to web page with opening hours list for shops --> | ||
* __Source__ : <!-- URL to web page where you got info from --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.~lock* | ||
/.~lock* | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Generates regles.csv from rules.csv for compatibility | ||
*/ | ||
|
||
const INPUT_FILE = 'rules.csv'; | ||
const OUTPUT_FILE = 'regles.csv'; | ||
|
||
const fs = require('fs'); | ||
const csvParse = require('csv-parse'); | ||
const csvStringify = require('csv-stringify'); | ||
|
||
const mapping_status = { "open": "ouvert", "open_adapted": "ouvert_adapté", "partial": "partiel", "closed": "fermé" }; | ||
|
||
fs.readFile(INPUT_FILE, (err, txt) => { | ||
if(err) { | ||
throw new Error(err); | ||
} | ||
|
||
csvParse(txt, { columns: true }, (err, csv) => { | ||
if(err) { | ||
throw new Error(err); | ||
} | ||
|
||
const out = csv.filter(row => row.country === 'FR').map(row => ({ | ||
categorie: row.category, | ||
nom_enseigne: row.brand_name, | ||
id_wikidata: row.wikidata_id, | ||
regle_ouverture: mapping_status[row.opening_rule], | ||
horaires: row.opening_hours, | ||
infos: row.description, | ||
url_source: row.source_url, | ||
url_horaires: row.opening_hours_url | ||
})); | ||
|
||
csvStringify( | ||
out, | ||
{ | ||
columns: [ 'categorie', 'nom_enseigne', 'id_wikidata', 'regle_ouverture', 'horaires', 'infos', 'url_source', 'url_horaires' ], | ||
header: true | ||
}, | ||
(err, csv) => { | ||
if(err) { | ||
throw new Error(err); | ||
} | ||
|
||
fs.writeFile(OUTPUT_FILE, csv, (err) => { | ||
if(err) { | ||
throw new Error(err); | ||
} | ||
|
||
console.log("Done"); | ||
}); | ||
} | ||
); | ||
}); | ||
}); |
Oops, something went wrong.