core: support mention notification

This commit is contained in:
undefined committed 2021-09-20 22:42:24 +08:00
1 parent d66c161e66
commit ca00dda575
14 files changed
+67 -24

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ export default async (q: string, path: string[] = []) => {
export const gql = (
pieces: TemplateStringsArray,
...templates: (string | number)[]
...templates: (string | number | string[] | number[])[]
) => {
let res = '';
for (let i = 0; i < pieces.length; i++) {
+1 -4
View File
@@ -1,10 +1,7 @@
import substitute from './substitute';
export default function i18n(str, ...params) {
if (window.LOCALES && window.LOCALES[str]) {
return substitute(window.LOCALES[str], params);
}
return substitute(str, params);
return substitute(window.LOCALES?.[str] || str, params);
}
window.Hydro.utils.i18n = i18n;