[WEBLATE] fix merge issues

pull/21833/head
RiotTranslate 2017-05-30 13:20:50 +00:00
commit 9f5a359f10
3 changed files with 10 additions and 10 deletions

View File

@ -45,10 +45,10 @@ const COMMANDS = [
command: '/ddg',
args: '<query>',
description: 'Searches DuckDuckGo for results',
}
},
];
let COMMAND_RE = /(^\/\w*)/g;
const COMMAND_RE = /(^\/\w*)/g;
let instance = null;
@ -62,15 +62,15 @@ export default class CommandProvider extends AutocompleteProvider {
async getCompletions(query: string, selection: {start: number, end: number}) {
let completions = [];
let {command, range} = this.getCurrentCommand(query, selection);
const {command, range} = this.getCurrentCommand(query, selection);
if (command) {
completions = this.fuse.search(command[0]).map(result => {
completions = this.fuse.search(command[0]).map((result) => {
return {
completion: result.command + ' ',
component: (<TextualCompletion
title={result.command}
subtitle={result.args}
description={ t_(result.description) }
description={ _t(result.description) }
/>),
range,
};
@ -84,8 +84,7 @@ export default class CommandProvider extends AutocompleteProvider {
}
static getInstance(): CommandProvider {
if (instance == null)
{instance = new CommandProvider();}
if (instance === null) instance = new CommandProvider();
return instance;
}

View File

@ -154,4 +154,5 @@
"The email address linked to your account must be entered.": "必须输入和你账号关联的邮箱地址。",
"The file '%(fileName)s' exceeds this home server's size limit for uploads": "文件 '%(fileName)s' 超过了此主服务器的上传大小限制",
"The file '%(fileName)s' failed to upload": "文件 '%(fileName)s' 上传失败"
"Guests can't use labs features. Please register.": "游客不能使用实验性功能。请注册。"
}

View File

@ -87,10 +87,10 @@ export function getAllLanguageKeysFromJson() {
}
export function getLanguagesFromBrowser() {
if (navigator.languages) return navigator.languages;
if (navigator.language) return [navigator.language]
if (navigator.languages && navigator.languages.length) return navigator.languages;
if (navigator.language) return [navigator.language];
return [navigator.userLanguage];
};
}
/**
* Turns a language string, normalises it,