#335: use i18n/index.json to generate flag icons

Conflicts:
	frontend/src/components/langMenu/LangMenu.jsx
	frontend/src/components/langMenu/langMenu.scss
This commit is contained in:
SleepWalker 2017-06-08 21:23:25 +03:00
parent 6c7bc914d6
commit a026ee3adf
2 changed files with 3 additions and 61 deletions

View File

@ -101,7 +101,9 @@ class LangMenu extends Component {
return (
<span>
<span className={styles[`lang${locale[0].toUpperCase() + locale.slice(1)}`]} />
<span className={styles.langIco} style={{
backgroundImage: `url('${require(`icons/flag_${locale}.svg`)}')`
}} />
{this.formatLocaleName(locale) || name}
{progressLabel}
</span>

View File

@ -106,66 +106,6 @@
top: -4px;
}
.langBe {
composes: langIco;
background-image: url('~icons/flag_be.svg');
}
.langEn {
composes: langIco;
background-image: url('~icons/flag_en.svg');
}
.langId {
composes: langIco;
background-image: url('~icons/flag_id.svg');
}
.langPl {
composes: langIco;
background-image: url('~icons/flag_pl.svg');
}
.langRo {
composes: langIco;
background-image: url('~icons/flag_ro.svg');
}
.langRu {
composes: langIco;
background-image: url('~icons/flag_ru.svg');
}
.langSl {
composes: langIco;
background-image: url('~icons/flag_sl.svg');
}
.langPt {
composes: langIco;
background-image: url('~icons/flag_pt.svg');
}
.langUk {
composes: langIco;
background-image: url('~icons/flag_uk.svg');
}
.langVi {
composes: langIco;
background-image: url('~icons/flag_vi.svg');
}
.improveTranslatesLink {
font-size: 11px;
text-align: center;