Skip to content

Commit 8c5259c

Browse files
authored
Merge branch 'main' into fix/api-wiki
2 parents a93cf01 + 8b7c0d8 commit 8c5259c

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

options/locale/locale_ja-JP.ini

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ files=ファイル
117117

118118
error=エラー
119119
error404=アクセスしようとしたページは<strong>存在しない</strong>か、閲覧が<strong>許可されていません</strong>。
120+
error503=サーバーはリクエストを完了できませんでした。 後でもう一度お試しください。
120121
go_back=戻る
121122
invalid_data=無効なデータ: %v
122123

@@ -730,6 +731,8 @@ public_profile=公開プロフィール
730731
biography_placeholder=自己紹介してください!(Markdownを使うことができます)
731732
location_placeholder=おおよその場所を他の人と共有
732733
profile_desc=あなたのプロフィールが他のユーザーにどのように表示されるかを制御します。あなたのプライマリメールアドレスは、通知、パスワードの回復、WebベースのGit操作に使用されます。
734+
password_username_disabled=ユーザー名の変更は許可されていません。詳細はサイト管理者にお問い合わせください。
735+
password_full_name_disabled=フルネームの変更は許可されていません。詳細はサイト管理者にお問い合わせください。
733736
full_name=フルネーム
734737
website=Webサイト
735738
location=場所
@@ -924,6 +927,9 @@ permission_not_set=設定なし
924927
permission_no_access=アクセス不可
925928
permission_read=読み取り
926929
permission_write=読み取りと書き込み
930+
permission_anonymous_read=匿名の読み込み
931+
permission_everyone_read=全員の読み込み
932+
permission_everyone_write=全員の書き込み
927933
access_token_desc=選択したトークン権限に応じて、関連する<a %s>API</a>ルートのみに許可が制限されます。 詳細は<a %s>ドキュメント</a>を参照してください。
928934
at_least_one_permission=トークンを作成するには、少なくともひとつの許可を選択する必要があります
929935
permissions_list=許可:
@@ -1136,6 +1142,7 @@ transfer.no_permission_to_reject=この移転を拒否する権限がありま
11361142

11371143
desc.private=プライベート
11381144
desc.public=公開
1145+
desc.public_access=公開アクセス
11391146
desc.template=テンプレート
11401147
desc.internal=内部
11411148
desc.archived=アーカイブ
@@ -1544,6 +1551,7 @@ issues.filter_project=プロジェクト
15441551
issues.filter_project_all=すべてのプロジェクト
15451552
issues.filter_project_none=プロジェクトなし
15461553
issues.filter_assignee=担当者
1554+
issues.filter_assignee_no_assignee=担当者なし
15471555
issues.filter_assignee_any_assignee=担当者あり
15481556
issues.filter_poster=作成者
15491557
issues.filter_user_placeholder=ユーザーを検索
@@ -1647,6 +1655,8 @@ issues.label_archived_filter=アーカイブされたラベルを表示
16471655
issues.label_archive_tooltip=アーカイブされたラベルは、ラベルによる検索時のサジェストからデフォルトで除外されます。
16481656
issues.label_exclusive_desc=ラベル名を <code>スコープ/アイテム</code> の形にすることで、他の <code>スコープ/</code> ラベルと排他的になります。
16491657
issues.label_exclusive_warning=イシューやプルリクエストのラベル編集では、競合するスコープ付きラベルは解除されます。
1658+
issues.label_exclusive_order=ソート順
1659+
issues.label_exclusive_order_tooltip=同じスコープ内の排他的なラベルは、この数値順にソートされます。
16501660
issues.label_count=ラベル %d件
16511661
issues.label_open_issues=オープン中のイシュー %d件
16521662
issues.label_edit=編集
@@ -2129,6 +2139,12 @@ contributors.contribution_type.deletions=削除
21292139
settings=設定
21302140
settings.desc=設定では、リポジトリの設定を管理することができます。
21312141
settings.options=リポジトリ
2142+
settings.public_access=公開アクセス
2143+
settings.public_access_desc=外部からの訪問者のアクセス権限について、このリポジトリのデフォルト設定を上書きします。
2144+
settings.public_access.docs.not_set=設定なし: 公開アクセス権限はありません。訪問者の権限は、リポジトリの公開範囲とメンバーの権限に従います。
2145+
settings.public_access.docs.anonymous_read=匿名の読み込み: ログインしていないユーザーは読み取り権限でユニットにアクセスできます。
2146+
settings.public_access.docs.everyone_read=全員の読み込み: すべてのログインユーザーは読み取り権限でユニットにアクセスできます。イシュー/プルリクエストユニットの読み取り権限は、ユーザーが新しいイシュー/プルリクエストを作成できることを意味します。
2147+
settings.public_access.docs.everyone_write=全員の書き込み: すべてのログインユーザーに書き込み権限があります。Wikiユニットのみがこの権限をサポートします。
21322148
settings.collaboration=共同作業者
21332149
settings.collaboration.admin=管理者
21342150
settings.collaboration.write=書き込み
@@ -2719,6 +2735,7 @@ branch.restore_success=ブランチ "%s" を復元しました。
27192735
branch.restore_failed=ブランチ "%s" の復元に失敗しました。
27202736
branch.protected_deletion_failed=ブランチ "%s" は保護されています。 削除できません。
27212737
branch.default_deletion_failed=ブランチ "%s" はデフォルトブランチです。 削除できません。
2738+
branch.default_branch_not_exist=デフォルトブランチ "%s" がありません。
27222739
branch.restore=ブランチ "%s" の復元
27232740
branch.download=ブランチ "%s" をダウンロード
27242741
branch.rename=ブランチ名 "%s" を変更

templates/shared/avatar_upload_crop.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- /* we do not need to set for/id here, global aria init code will add them automatically */ -}}
22
<label>{{.LabelText}}</label>
3-
<input class="avatar-file-with-cropper" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
3+
<input class="avatar-file-with-cropper" name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp" data-global-init="initAvatarUploader">
44
{{- /* the cropper-panel must be next sibling of the input "avatar" */ -}}
55
<div class="cropper-panel tw-hidden">
66
<div class="tw-my-2">{{ctx.Locale.Tr "settings.cropper_prompt"}}</div>

web_src/js/features/admin/common.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {checkAppUrl} from '../common-page.ts';
22
import {hideElem, queryElems, showElem, toggleElem} from '../../utils/dom.ts';
33
import {POST} from '../../modules/fetch.ts';
4-
import {initAvatarUploaderWithCropper} from '../comp/Cropper.ts';
54
import {fomanticQuery} from '../../modules/fomantic/base.ts';
65

76
const {appSubUrl} = window.config;
@@ -23,8 +22,6 @@ export function initAdminCommon(): void {
2322
initAdminUser();
2423
initAdminAuthentication();
2524
initAdminNotice();
26-
27-
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
2825
}
2926

3027
function initAdminUser() {

web_src/js/features/common-organization.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {initCompLabelEdit} from './comp/LabelEdit.ts';
2-
import {queryElems, toggleElem} from '../utils/dom.ts';
3-
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
2+
import {toggleElem} from '../utils/dom.ts';
43

54
export function initCommonOrganization() {
65
if (!document.querySelectorAll('.organization').length) {
@@ -14,6 +13,4 @@ export function initCommonOrganization() {
1413

1514
// Labels
1615
initCompLabelEdit('.page-content.organization.settings.labels');
17-
18-
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
1916
}

web_src/js/features/common-page.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {showGlobalErrorMessage} from '../bootstrap.ts';
33
import {fomanticQuery} from '../modules/fomantic/base.ts';
44
import {queryElems} from '../utils/dom.ts';
55
import {registerGlobalInitFunc, registerGlobalSelectorFunc} from '../modules/observer.ts';
6+
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
67

78
const {appUrl} = window.config;
89

@@ -80,6 +81,10 @@ export function initGlobalTabularMenu() {
8081
fomanticQuery('.ui.menu.tabular:not(.custom) .item').tab();
8182
}
8283

84+
export function initGlobalAvatarUploader() {
85+
registerGlobalInitFunc('initAvatarUploader', initAvatarUploaderWithCropper);
86+
}
87+
8388
// for performance considerations, it only uses performant syntax
8489
function attachInputDirAuto(el: Partial<HTMLInputElement | HTMLTextAreaElement>) {
8590
if (el.type !== 'hidden' &&

web_src/js/features/repo-settings.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {minimatch} from 'minimatch';
22
import {createMonaco} from './codeeditor.ts';
33
import {onInputDebounce, queryElems, toggleClass, toggleElem} from '../utils/dom.ts';
44
import {POST} from '../modules/fetch.ts';
5-
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
65
import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts';
76
import {fomanticQuery} from '../modules/fomantic/base.ts';
87

@@ -149,6 +148,4 @@ export function initRepoSettings() {
149148
initRepoSettingsSearchTeamBox();
150149
initRepoSettingsGitHook();
151150
initRepoSettingsBranchesDrag();
152-
153-
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
154151
}

web_src/js/features/user-settings.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import {hideElem, queryElems, showElem} from '../utils/dom.ts';
2-
import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
1+
import {hideElem, showElem} from '../utils/dom.ts';
32

43
export function initUserSettings() {
54
if (!document.querySelector('.user.settings.profile')) return;
65

7-
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
8-
96
const usernameInput = document.querySelector<HTMLInputElement>('#username');
107
if (!usernameInput) return;
118
usernameInput.addEventListener('input', function () {

web_src/js/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import {initColorPickers} from './features/colorpicker.ts';
6060
import {initAdminSelfCheck} from './features/admin/selfcheck.ts';
6161
import {initOAuth2SettingsDisableCheckbox} from './features/oauth2-settings.ts';
6262
import {initGlobalFetchAction} from './features/common-fetch-action.ts';
63-
import {initFootLanguageMenu, initGlobalDropdown, initGlobalInput, initGlobalTabularMenu, initHeadNavbarContentToggle} from './features/common-page.ts';
63+
import {initFootLanguageMenu, initGlobalAvatarUploader, initGlobalDropdown, initGlobalInput, initGlobalTabularMenu, initHeadNavbarContentToggle} from './features/common-page.ts';
6464
import {initGlobalButtonClickOnEnter, initGlobalButtons, initGlobalDeleteButton} from './features/common-button.ts';
6565
import {initGlobalComboMarkdownEditor, initGlobalEnterQuickSubmit, initGlobalFormDirtyLeaveConfirm} from './features/common-form.ts';
6666
import {callInitFunctions} from './modules/init.ts';
@@ -72,6 +72,7 @@ initSubmitEventPolyfill();
7272
onDomReady(() => {
7373
const initStartTime = performance.now();
7474
const initPerformanceTracer = callInitFunctions([
75+
initGlobalAvatarUploader,
7576
initGlobalDropdown,
7677
initGlobalTabularMenu,
7778
initGlobalFetchAction,

web_src/js/utils/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function queryElemChildren<T extends Element>(parent: Element | ParentNod
8989
}
9090

9191
// it works like parent.querySelectorAll: all descendants are selected
92-
// in the future, all "queryElems(document, ...)" should be refactored to use a more specific parent
92+
// in the future, all "queryElems(document, ...)" should be refactored to use a more specific parent if the targets are not for page-level components.
9393
export function queryElems<T extends HTMLElement>(parent: Element | ParentNode, selector: string, fn?: ElementsCallback<T>): ArrayLikeIterable<T> {
9494
return applyElemsCallback<T>(parent.querySelectorAll(selector), fn);
9595
}

0 commit comments

Comments
 (0)