Make admin l10n work again
The localization.json file contains path like 'l10n/lang.json' which means path relative the html file being accessed. This works when we access .../loleaflet.html but not so when we access .../admin/admin.html because then it tries to access .../admin/l10n/lang.json while it should look for this file one directory up. One could think to change the paths in localization.json file to something like '/loleaflet/dist/l10n/lang.json' so that same path is accessed always for loleaflet UI as well as admin, but it has repercussions that we access l10n data always using 'dist' prefix and not using git hash, so browser caching the l10n data across multiple versions. Ideal would be to split the admin localization completely from the loleaflet-ui localization. No point in fetching whole of the loleaflet localizations strings when we are only accessing the admin console. This would also solve problem mentioned previously. For now, just split the admin localization file only while still allowing admin console to fetch the same l10n files. Change-Id: I0824fb05b9b4123b58d6fd8edafb374ee7128229
This commit is contained in:
parent
7aeb66be88
commit
163e04af0b
5 changed files with 125 additions and 4 deletions
2
loleaflet/dist/admin/admin.html
vendored
2
loleaflet/dist/admin/admin.html
vendored
|
@ -15,7 +15,7 @@
|
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/admin-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/loleaflet/dist/admin-bundle.js"></script>
|
||||
|
|
2
loleaflet/dist/admin/adminAnalytics.html
vendored
2
loleaflet/dist/admin/adminAnalytics.html
vendored
|
@ -15,7 +15,7 @@
|
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/admin-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/loleaflet/dist/admin-bundle.js"></script>
|
||||
|
|
2
loleaflet/dist/admin/adminHistory.html
vendored
2
loleaflet/dist/admin/adminHistory.html
vendored
|
@ -15,7 +15,7 @@
|
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/admin-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
|
2
loleaflet/dist/admin/adminSettings.html
vendored
2
loleaflet/dist/admin/adminSettings.html
vendored
|
@ -15,7 +15,7 @@
|
|||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
<link rel="localizations" href="/loleaflet/dist/l10n/admin-localizations.json" type="application/vnd.oftn.l10n+json"/>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/loleaflet/dist/admin-bundle.js"></script>
|
||||
|
|
121
loleaflet/dist/l10n/admin-localizations.json
vendored
Normal file
121
loleaflet/dist/l10n/admin-localizations.json
vendored
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"en": false,
|
||||
"ab": "/loleaflet/dist/l10n/ui-ab.json",
|
||||
"af": "/loleaflet/dist/l10n/ui-af.json",
|
||||
"am": "/loleaflet/dist/l10n/ui-am.json",
|
||||
"an": "/loleaflet/dist/l10n/ui-an.json",
|
||||
"ar": "/loleaflet/dist/l10n/ui-ar.json",
|
||||
"as": "/loleaflet/dist/l10n/ui-as.json",
|
||||
"ast": "/loleaflet/dist/l10n/ui-ast.json",
|
||||
"az": "/loleaflet/dist/l10n/ui-az.json",
|
||||
"be": "/loleaflet/dist/l10n/ui-be.json",
|
||||
"bg": "/loleaflet/dist/l10n/ui-bg.json",
|
||||
"bn-in": "/loleaflet/dist/l10n/ui-bn_IN.json",
|
||||
"bn": "/loleaflet/dist/l10n/ui-bn.json",
|
||||
"bo": "/loleaflet/dist/l10n/ui-bo.json",
|
||||
"br": "/loleaflet/dist/l10n/ui-br.json",
|
||||
"brx": "/loleaflet/dist/l10n/ui-brx.json",
|
||||
"bs": "/loleaflet/dist/l10n/ui-bs.json",
|
||||
"ca": "/loleaflet/dist/l10n/ui-ca.json",
|
||||
"cs": "/loleaflet/dist/l10n/ui-cs.json",
|
||||
"cy": "/loleaflet/dist/l10n/ui-cy.json",
|
||||
"da": "/loleaflet/dist/l10n/ui-da.json",
|
||||
"de": "/loleaflet/dist/l10n/ui-de.json",
|
||||
"dgo": "/loleaflet/dist/l10n/ui-dgo.json",
|
||||
"dsb": "/loleaflet/dist/l10n/ui-dsb.json",
|
||||
"dz": "/loleaflet/dist/l10n/ui-dz.json",
|
||||
"el": "/loleaflet/dist/l10n/ui-el.json",
|
||||
"en-gb": "/loleaflet/dist/l10n/ui-en_GB.json",
|
||||
"en-za": "/loleaflet/dist/l10n/ui-en_ZA.json",
|
||||
"eo": "/loleaflet/dist/l10n/ui-eo.json",
|
||||
"es": "/loleaflet/dist/l10n/ui-es.json",
|
||||
"et": "/loleaflet/dist/l10n/ui-et.json",
|
||||
"eu": "/loleaflet/dist/l10n/ui-eu.json",
|
||||
"fa": "/loleaflet/dist/l10n/ui-fa.json",
|
||||
"fi": "/loleaflet/dist/l10n/ui-fi.json",
|
||||
"fr": "/loleaflet/dist/l10n/ui-fr.json",
|
||||
"ga": "/loleaflet/dist/l10n/ui-ga.json",
|
||||
"gd": "/loleaflet/dist/l10n/ui-gd.json",
|
||||
"gl": "/loleaflet/dist/l10n/ui-gl.json",
|
||||
"gn": "/loleaflet/dist/l10n/ui-gug.json",
|
||||
"gu": "/loleaflet/dist/l10n/ui-gu.json",
|
||||
"he": "/loleaflet/dist/l10n/ui-he.json",
|
||||
"hi": "/loleaflet/dist/l10n/ui-hi.json",
|
||||
"hr": "/loleaflet/dist/l10n/ui-hr.json",
|
||||
"hsb": "/loleaflet/dist/l10n/ui-hsb.json",
|
||||
"hu": "/loleaflet/dist/l10n/ui-hu.json",
|
||||
"id": "/loleaflet/dist/l10n/ui-id.json",
|
||||
"is": "/loleaflet/dist/l10n/ui-is.json",
|
||||
"it": "/loleaflet/dist/l10n/ui-it.json",
|
||||
"ja": "/loleaflet/dist/l10n/ui-ja.json",
|
||||
"jv": "/loleaflet/dist/l10n/ui-jv.json",
|
||||
"ka": "/loleaflet/dist/l10n/ui-ka.json",
|
||||
"kk": "/loleaflet/dist/l10n/ui-kk.json",
|
||||
"kl": "/loleaflet/dist/l10n/ui-kl.json",
|
||||
"km": "/loleaflet/dist/l10n/ui-km.json",
|
||||
"kn": "/loleaflet/dist/l10n/ui-kn.json",
|
||||
"kok": "/loleaflet/dist/l10n/ui-kok.json",
|
||||
"ko": "/loleaflet/dist/l10n/ui-ko.json",
|
||||
"ks": "/loleaflet/dist/l10n/ui-ks.json",
|
||||
"ky": "/loleaflet/dist/l10n/ui-ky.json",
|
||||
"lb": "/loleaflet/dist/l10n/ui-lb.json",
|
||||
"lo": "/loleaflet/dist/l10n/ui-lo.json",
|
||||
"lt": "/loleaflet/dist/l10n/ui-lt.json",
|
||||
"lv": "/loleaflet/dist/l10n/ui-lv.json",
|
||||
"mai": "/loleaflet/dist/l10n/ui-mai.json",
|
||||
"mk": "/loleaflet/dist/l10n/ui-mk.json",
|
||||
"ml": "/loleaflet/dist/l10n/ui-ml.json",
|
||||
"mni": "/loleaflet/dist/l10n/ui-mni.json",
|
||||
"mn": "/loleaflet/dist/l10n/ui-mn.json",
|
||||
"mr": "/loleaflet/dist/l10n/ui-mr.json",
|
||||
"my": "/loleaflet/dist/l10n/ui-my.json",
|
||||
"nb": "/loleaflet/dist/l10n/ui-nb.json",
|
||||
"ne": "/loleaflet/dist/l10n/ui-ne.json",
|
||||
"nl": "/loleaflet/dist/l10n/ui-nl.json",
|
||||
"nn": "/loleaflet/dist/l10n/ui-nn.json",
|
||||
"nr": "/loleaflet/dist/l10n/ui-nr.json",
|
||||
"nso": "/loleaflet/dist/l10n/ui-nso.json",
|
||||
"oc": "/loleaflet/dist/l10n/ui-oc.json",
|
||||
"om": "/loleaflet/dist/l10n/ui-om.json",
|
||||
"or": "/loleaflet/dist/l10n/ui-or.json",
|
||||
"pa-in": "/loleaflet/dist/l10n/ui-pa_IN.json",
|
||||
"pl": "/loleaflet/dist/l10n/ui-pl.json",
|
||||
"pt-br": "/loleaflet/dist/l10n/ui-pt_BR.json",
|
||||
"pt": "/loleaflet/dist/l10n/ui-pt.json",
|
||||
"ro": "/loleaflet/dist/l10n/ui-ro.json",
|
||||
"ru": "/loleaflet/dist/l10n/ui-ru.json",
|
||||
"rw": "/loleaflet/dist/l10n/ui-rw.json",
|
||||
"sah": "/loleaflet/dist/l10n/ui-sah.json",
|
||||
"sa": "/loleaflet/dist/l10n/ui-sa_IN.json",
|
||||
"sat": "/loleaflet/dist/l10n/ui-sat.json",
|
||||
"sd": "/loleaflet/dist/l10n/ui-sd.json",
|
||||
"sid": "/loleaflet/dist/l10n/ui-sid.json",
|
||||
"si": "/loleaflet/dist/l10n/ui-si.json",
|
||||
"sk": "/loleaflet/dist/l10n/ui-sk.json",
|
||||
"sl": "/loleaflet/dist/l10n/ui-sl.json",
|
||||
"sq": "/loleaflet/dist/l10n/ui-sq.json",
|
||||
"sr": "/loleaflet/dist/l10n/ui-sr.json",
|
||||
"ss": "/loleaflet/dist/l10n/ui-ss.json",
|
||||
"st": "/loleaflet/dist/l10n/ui-st.json",
|
||||
"sv": "/loleaflet/dist/l10n/ui-sv.json",
|
||||
"sw": "/loleaflet/dist/l10n/ui-sw_TZ.json",
|
||||
"ta": "/loleaflet/dist/l10n/ui-ta.json",
|
||||
"te": "/loleaflet/dist/l10n/ui-te.json",
|
||||
"tg": "/loleaflet/dist/l10n/ui-tg.json",
|
||||
"th": "/loleaflet/dist/l10n/ui-th.json",
|
||||
"ti": "/loleaflet/dist/l10n/ui-ti.json",
|
||||
"tn": "/loleaflet/dist/l10n/ui-tn.json",
|
||||
"tr": "/loleaflet/dist/l10n/ui-tr.json",
|
||||
"ts": "/loleaflet/dist/l10n/ui-ts.json",
|
||||
"tt": "/loleaflet/dist/l10n/ui-tt.json",
|
||||
"ug": "/loleaflet/dist/l10n/ui-ug.json",
|
||||
"uk": "/loleaflet/dist/l10n/ui-uk.json",
|
||||
"ur": "/loleaflet/dist/l10n/ui-ur.json",
|
||||
"uz": "/loleaflet/dist/l10n/ui-uz.json",
|
||||
"ve": "/loleaflet/dist/l10n/ui-ve.json",
|
||||
"vi": "/loleaflet/dist/l10n/ui-vi.json",
|
||||
"xh": "/loleaflet/dist/l10n/ui-xh.json",
|
||||
"zh-cn": "/loleaflet/dist/l10n/ui-zh_CN.json",
|
||||
"zh-tw": "/loleaflet/dist/l10n/ui-zh_TW.json",
|
||||
"zu": "/loleaflet/dist/l10n/ui-zu.json"
|
||||
}
|
Loading…
Reference in a new issue