Skip to content

Commit

Permalink
Merge branch 'main' into goldmark-update
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang authored Jan 29, 2022
2 parents b7034a2 + 726715f commit 44cdd1b
Show file tree
Hide file tree
Showing 53 changed files with 114 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ env:

globals:
__webpack_public_path__: true
CodeMirror: false
Dropzone: false
SimpleMDE: false

settings:
html/html-extensions: [".tmpl"]
Expand All @@ -34,7 +31,6 @@ overrides:
- files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl"]
env:
browser: true
jquery: true
node: false
- files: ["templates/**/*.tmpl"]
rules:
Expand Down
4 changes: 4 additions & 0 deletions options/locale/locale_zh-CN.ini
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ search=搜索
code=代码
search.fuzzy=模糊
search.match=匹配
code_search_unavailable=当前代码搜索不可用。请与网站管理员联系。
repo_no_results=未找到匹配的仓库。
user_no_results=未找到匹配的用户。
org_no_results=未找到匹配的组织。
Expand Down Expand Up @@ -1262,6 +1263,7 @@ issues.filter_sort.moststars=点赞由多到少
issues.filter_sort.feweststars=点赞由少到多
issues.filter_sort.mostforks=派生由多到少
issues.filter_sort.fewestforks=派生由少到多
issues.keyword_search_unavailable=当前无法通过关键字搜索。请联系网站管理员。
issues.action_open=开启
issues.action_close=关闭
issues.action_label=标签
Expand Down Expand Up @@ -1707,6 +1709,8 @@ search.search_repo=搜索仓库...
search.fuzzy=模糊
search.match=匹配
search.results=在 <a href="%[2]s"> %[3]s </a> 中搜索 "%[1]s" 的结果
search.code_no_results=未找到与搜索字词匹配的源代码。
search.code_search_unavailable=当前代码搜索不可用。请与网站管理员联系。
settings=设置
settings.desc=设置是你可以管理仓库设置的地方
Expand Down
48 changes: 34 additions & 14 deletions options/locale/locale_zh-TW.ini
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ search=搜尋
code=程式碼
search.fuzzy=模糊
search.match=符合
code_search_unavailable=現在無法使用程式碼搜尋。請與網站管理員聯絡。
repo_no_results=沒有找到符合的儲存庫。
user_no_results=沒有找到符合的使用者。
org_no_results=沒有找到符合的組織。
Expand Down Expand Up @@ -549,6 +550,22 @@ continue=繼續操作
cancel=取消
language=語言
ui=佈景主題
hidden_comment_types=隱藏的留言類型
comment_type_group_reference=參考
comment_type_group_label=標籤
comment_type_group_milestone=里程碑
comment_type_group_assignee=負責人
comment_type_group_title=標題
comment_type_group_branch=分支
comment_type_group_time_tracking=時間追蹤
comment_type_group_deadline=最後期限
comment_type_group_dependency=先決條件
comment_type_group_lock=鎖定狀態
comment_type_group_review_request=審核請求
comment_type_group_pull_request_push=加入的提交
comment_type_group_project=專案
comment_type_group_issue_ref=問題參考
saved_successfully=您的設定已成功儲存。
privacy=隱私
keep_activity_private=在個人資料頁面隱藏動態
keep_activity_private_popup=讓動態只有你和管理員看得到
Expand Down Expand Up @@ -1152,7 +1169,7 @@ projects.open=開啟
projects.close=關閉

issues.desc=管理錯誤報告、任務和里程碑。
issues.filter_assignees=篩選成員
issues.filter_assignees=篩選負責人
issues.filter_milestones=篩選里程碑
issues.filter_projects=篩選專案
issues.filter_labels=篩選標籤
Expand All @@ -1176,10 +1193,10 @@ issues.new.no_milestone=未選擇里程碑
issues.new.clear_milestone=清除已選取里程碑
issues.new.open_milestone=開放中的里程碑
issues.new.closed_milestone=已關閉的里程碑
issues.new.assignees=成員
issues.new.add_assignees_title=指派成員
issues.new.clear_assignees=清除成員
issues.new.no_assignees=沒有成員
issues.new.assignees=負責人
issues.new.add_assignees_title=指派負責人
issues.new.clear_assignees=清除負責人
issues.new.no_assignees=沒有負責人
issues.new.no_reviewers=沒有審核者
issues.new.add_reviewer_title=請求審核
issues.choose.get_started=開始
Expand Down Expand Up @@ -1225,8 +1242,8 @@ issues.filter_label_exclude=`使用 <code>alt</code> + <code>click/enter</code>
issues.filter_label_no_select=所有標籤
issues.filter_milestone=里程碑
issues.filter_milestone_no_select=所有里程碑
issues.filter_assignee=成員
issues.filter_assginee_no_select=所有成員
issues.filter_assignee=負責人
issues.filter_assginee_no_select=所有負責人
issues.filter_type=類型
issues.filter_type.all_issues=所有問題
issues.filter_type.assigned_to_you=指派給您的
Expand All @@ -1246,13 +1263,14 @@ issues.filter_sort.moststars=最多星號
issues.filter_sort.feweststars=最少星號
issues.filter_sort.mostforks=最多 fork
issues.filter_sort.fewestforks=最少 fork
issues.keyword_search_unavailable=現在無法使用關鍵字搜尋。請與網站管理員聯絡。
issues.action_open=開放
issues.action_close=關閉
issues.action_label=標籤
issues.action_milestone=里程碑
issues.action_milestone_no_select=無里程碑
issues.action_assignee=成員
issues.action_assignee_no_select=沒有成員
issues.action_assignee=負責人
issues.action_assignee_no_select=沒有負責人
issues.opened_by=建立於 %[1]s 由 <a href="%[2]s">%[3]s</a>
pulls.merged_by=由 <a href="%[2]s">%[3]s</a> 建立,合併於 %[1]s
pulls.merged_by_fake=由 %[2]s 建立,合併於 %[1]s
Expand Down Expand Up @@ -1431,7 +1449,7 @@ issues.review.hide_resolved=隱藏已解決
issues.review.resolve_conversation=解決對話
issues.review.un_resolve_conversation=取消解決對話
issues.review.resolved_by=標記了此對話為已解決
issues.assignee.error=因為未預期的錯誤,未能成功指派所有成員
issues.assignee.error=因為未預期的錯誤,未能成功加入所有負責人
issues.reference_issue.body=內容
issues.content_history.deleted=刪除
issues.content_history.edited=編輯
Expand Down Expand Up @@ -1572,8 +1590,8 @@ milestones.edit_success=已更新里程碑「%s」。
milestones.deletion=刪除里程碑
milestones.deletion_desc=刪除里程碑會從所有相關的問題移除它。是否繼續?
milestones.deletion_success=里程碑已刪除
milestones.filter_sort.closest_due_date=到期日由近到遠
milestones.filter_sort.furthest_due_date=到期日由遠到近
milestones.filter_sort.closest_due_date=截止日期由近到遠
milestones.filter_sort.furthest_due_date=截止日期由遠到近
milestones.filter_sort.least_complete=完成度由低到高
milestones.filter_sort.most_complete=完成度由高到低
milestones.filter_sort.most_issues=問題由多到少
Expand Down Expand Up @@ -1691,6 +1709,8 @@ search.search_repo=搜尋儲存庫
search.fuzzy=模糊
search.match=符合
search.results=在 <a href="%s"> %s </a> 中搜尋 "%s" 的结果
search.code_no_results=找不到符合您關鍵字的原始碼。
search.code_search_unavailable=現在無法使用程式碼搜尋。請與網站管理員聯絡。

settings=設定
settings.desc=設定是您可以管理儲存庫設定的地方
Expand Down Expand Up @@ -1887,7 +1907,7 @@ settings.event_repository_desc=建立或刪除儲存庫。
settings.event_header_issue=問題事件
settings.event_issues=問題
settings.event_issues_desc=建立、編輯、關閉及重新開放問題。
settings.event_issue_assign=指派
settings.event_issue_assign=指派問題
settings.event_issue_assign_desc=指派或取消指派問題。
settings.event_issue_label=標籤
settings.event_issue_label_desc=更新或清除問題標籤。
Expand All @@ -1898,7 +1918,7 @@ settings.event_issue_comment_desc=已經建立、編輯或刪除的問題留言
settings.event_header_pull_request=合併請求事件
settings.event_pull_request=合併請求
settings.event_pull_request_desc=建立、編輯、關閉及重新開放合併請求。
settings.event_pull_request_assign=合併請求指派
settings.event_pull_request_assign=指派合併請求
settings.event_pull_request_assign_desc=指派或取消指派合併請求。
settings.event_pull_request_label=合併請求標籤
settings.event_pull_request_label_desc=更新或清除合併請求標籤。
Expand Down
1 change: 1 addition & 0 deletions web_src/js/components/ContextPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</template>

<script>
import $ from 'jquery';
import {SvgIcon} from '../svg.js';
const {appSubUrl, i18n} = window.config;
Expand Down
1 change: 1 addition & 0 deletions web_src/js/components/DashboardRepoList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vue from 'vue';
import $ from 'jquery';
import {initVueSvg, vueDelimiters} from './VueComponentLoader.js';

const {appSubUrl, assetUrlPrefix, pageData} = window.config;
Expand Down
1 change: 1 addition & 0 deletions web_src/js/components/RepoBranchTagDropdown.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Vue from 'vue';
import $ from 'jquery';
import {vueDelimiters} from './VueComponentLoader.js';

export function initRepoBranchTagDropdown(selector) {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/admin-common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

const {csrfToken} = window.config;

export function initAdminCommon() {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/admin-emails.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

export function initAdminEmails() {
function linkEmailAction(e) {
const $this = $(this);
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/admin-users.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

export function initAdminUserListSearchForm() {
const searchForm = window.config.pageData.adminUserListSearchForm;
if (!searchForm) return;
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

const {copy_success, copy_error} = window.config.i18n;

function onSuccess(btn) {
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import $ from 'jquery';
import 'jquery.are-you-sure';
import {mqBinarySearch} from '../utils.js';
import createDropzone from './dropzone.js';
import {initCompColorPicker} from './comp/ColorPicker.js';

import 'jquery.are-you-sure';

const {csrfToken} = window.config;

export function initGlobalFormDirtyLeaveConfirm() {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/common-issue.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {updateIssuesMeta} from './repo-issue.js';

export function initCommonIssue() {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/common-organization.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {initCompLabelEdit} from './comp/LabelEdit.js';

export function initCommonOrganization() {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/ColorPicker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import createColorPicker from '../colorpicker.js';

export function initCompColorPicker() {
Expand Down
5 changes: 3 additions & 2 deletions web_src/js/features/comp/EasyMDE.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import attachTribute from '../tribute.js';

const {appSubUrl} = window.config;
Expand Down Expand Up @@ -54,7 +55,7 @@ export async function importEasyMDE() {
* @returns {null|EasyMDE}
*/
export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) {
if (textarea instanceof jQuery) {
if (textarea instanceof $) {
textarea = textarea[0];
}
if (!textarea) {
Expand Down Expand Up @@ -151,7 +152,7 @@ export function attachEasyMDEToElements(easyMDE) {
* @returns {null|EasyMDE}
*/
export function getAttachedEasyMDE(el) {
if (el instanceof jQuery) {
if (el instanceof $) {
el = el[0];
}
if (!el) {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/ImagePaste.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
const {csrfToken} = window.config;

async function uploadFile(file, uploadUrl) {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/LabelEdit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {initCompColorPicker} from './ColorPicker.js';

export function initCompLabelEdit(selector) {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/MarkupContentPreview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {initMarkupContent} from '../../markup/content.js';

const {csrfToken} = window.config;
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/ReactionSelector.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
const {csrfToken} = window.config;

export function initCompReactionSelector(parent) {
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/SearchUserBox.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {htmlEscape} from 'escape-goat';

const {appSubUrl} = window.config;
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/comp/WebHookEditor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
const {csrfToken} = window.config;

export function initCompWebHookEditor() {
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/contextpopup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $ from 'jquery';
import Vue from 'vue';

import ContextPopup from '../components/ContextPopup.vue';
import {parseIssueHref} from '../utils.js';

Expand Down
1 change: 0 additions & 1 deletion web_src/js/features/heatmap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Vue from 'vue';

import ActivityHeatmap from '../components/ActivityHeatmap.vue';

export default function initHeatmap() {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/imagediff.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

function getDefaultSvgBoundsIfUndefined(svgXml, src) {
const DefaultSize = 300;
const MaxSize = 99999;
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/install.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

export function initInstall() {
if ($('.page-content.install').length === 0) {
return;
Expand Down
3 changes: 2 additions & 1 deletion web_src/js/features/notification.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {appSubUrl, csrfToken, notificationSettings} = window.config;
import $ from 'jquery';

const {appSubUrl, csrfToken, notificationSettings} = window.config;
let notificationSequenceNumber = 0;

export function initNotificationsTable() {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/org-team.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

const {appSubUrl} = window.config;

export function initOrgTeamSettings() {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/repo-branch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

export function initRepoBranchButton() {
$('.show-create-branch-modal.button').on('click', function () {
$('#create-branch-form')[0].action = $('#create-branch-form').data('base-action') + $(this).data('branch-from-urlcomponent');
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/repo-code.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {svg} from '../svg.js';

function changeHash(hash) {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/repo-commit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

const {csrfToken} = window.config;

export function initRepoEllipsisButton() {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/repo-common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

const {csrfToken} = window.config;

function getArchive($target, url, first) {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/repo-diff.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import $ from 'jquery';
import {initCompReactionSelector} from './comp/ReactionSelector.js';
import {initRepoIssueContentHistory} from './repo-issue-content.js';
import {validateTextareaNonEmpty} from './comp/EasyMDE.js';

const {csrfToken} = window.config;

export function initRepoDiffReviewButton() {
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/repo-editor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import $ from 'jquery';
import {htmlEscape} from 'escape-goat';
import {initMarkupContent} from '../markup/content.js';
import {createCodeEditor} from './codeeditor.js';

const {csrfToken} = window.config;

let previewFileModes;

function initEditPreviewTab($form) {
Expand Down
2 changes: 2 additions & 0 deletions web_src/js/features/repo-graph.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

export default function initRepoGraphGit() {
const graphContainer = document.getElementById('git-graph-container');
if (!graphContainer) return;
Expand Down
1 change: 1 addition & 0 deletions web_src/js/features/repo-home.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import {stripTags} from '../utils.js';

const {appSubUrl, csrfToken} = window.config;
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/repo-issue-content.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import $ from 'jquery';
import {svg} from '../svg.js';

const {appSubUrl, csrfToken} = window.config;

let i18nTextEdited;
let i18nTextOptions;
let i18nTextDeleteFromHistory;
Expand Down
Loading

0 comments on commit 44cdd1b

Please sign in to comment.