Improved autonomies names
This commit is contained in:
parent
681c70f80c
commit
de7c56d99b
2 changed files with 17 additions and 12 deletions
|
|
@ -9,7 +9,7 @@ const debug = 0;
|
|||
const cleanProv = (prov, stringsToRemove) => {
|
||||
let lprov = prov;
|
||||
stringsToRemove.forEach((st) => {
|
||||
lprov = lprov.replace(st, '');
|
||||
lprov = lprov.replace(st[0], st[1]);
|
||||
});
|
||||
return lprov;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,17 +9,22 @@ const autonomies = tbuffer(JSON.parse(getPrivateFile('data/es-atlas-autonomies.j
|
|||
const portugal = tbuffer(JSON.parse(getPrivateFile('data/pt-atlas.json')), 0);
|
||||
|
||||
const stringsToRemove = [
|
||||
'Ciudad Autónoma de',
|
||||
'País Vasco/',
|
||||
'Comunidad Foral de',
|
||||
'Región de',
|
||||
// FIXME Madrid y Valencia
|
||||
'Comunidad de',
|
||||
'Cataluña/',
|
||||
// FIXME Castilla-León
|
||||
'Castilla-',
|
||||
'Principado de',
|
||||
' '
|
||||
['Ciudad Autónoma de', ''],
|
||||
['País Vasco/', ''],
|
||||
['Pais Vasco', 'Euskadi'],
|
||||
['Comunidad Foral de', ''],
|
||||
['Región de', ''],
|
||||
['Valencia', 'CValenciana'],
|
||||
['Comunidad de Madrid', 'CMadrid'],
|
||||
['La Mancha', 'CLMancha'],
|
||||
['León', 'CyL'],
|
||||
['Castilla-', ''],
|
||||
['Cataluña/', ''],
|
||||
['Cataluña', 'Catalunya'],
|
||||
['Baleares', 'IllesBalears'],
|
||||
['Galicia', 'Galiza'],
|
||||
['Principado de', ''],
|
||||
[' ', '']
|
||||
];
|
||||
|
||||
const composeTweet = (num, stats) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue