From 7b3fb87e8794a86d2f2640d9b02a2c81553e76d5 Mon Sep 17 00:00:00 2001 From: redwerkz Date: Fri, 9 Sep 2022 12:32:40 +0200 Subject: [PATCH 01/12] Add "Clone in VS Codium"-button #21121 Remove all translations except en-US --- options/locale/locale_en-US.ini | 1 + options/locale/locale_fa-IR.ini | 12 ++++++------ public/img/svg/gitea-vscodium.svg | 1 + templates/repo/home.tmpl | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 public/img/svg/gitea-vscodium.svg diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1dba1d71d8ffe..1c3c8d3a2b344 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -836,6 +836,7 @@ fork_to_different_account = Fork to a different account fork_visibility_helper = The visibility of a forked repository cannot be changed. use_template = Use this template clone_in_vsc = Clone in VS Code +clone_in_vscodium = Clone in VS Codium download_zip = Download ZIP download_tar = Download TAR.GZ download_bundle = Download BUNDLE diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini index 0536bd42f2447..72d454a4a598c 100644 --- a/options/locale/locale_fa-IR.ini +++ b/options/locale/locale_fa-IR.ini @@ -661,10 +661,10 @@ delete_token=حذف access_token_deletion=حذف توکن delete_token_success=token مورد نظر حذف شد. برنامه هایی که از آن استفاده می‎کنند به زودی دسترسی به حساب کاربری شما را از دست می‎دهند. -manage_oauth2_applications=مدیریت برنامه‎های OAuth2 -edit_oauth2_application=ویرایش برنامه OAuth2 +manage_oauth2_applications=مدیریت برنامه‎های OAuth2 +edit_oauth2_application=ویرایش برنامه OAuth2 oauth2_applications_desc=برنامه‎های OAuth2 احراز هویت برنامه های شخص ثالث را با بستری امن میسر می‎کند. -remove_oauth2_application=حذف برنامه OAuth2 +remove_oauth2_application=حذف برنامه OAuth2 remove_oauth2_application_desc=حذف برنامه OAuth2 دسترسی تمام برنامه های متصل با آن را از بین می‎برد. آیا ادامه می‎دهید؟ remove_oauth2_application_success=برنامه حذف شده است. create_oauth2_application=ساختن یک برنامه OAuth2 جدید @@ -882,7 +882,7 @@ migrate.clone_local_path=یا مسیر سرویس دهنده محلی migrate.permission_denied=شما مجاز به واردات مخازن محلی نیستید. migrate.permission_denied_blocked=نمی‌توانید از میزبان‌های غیرمجاز وارد کنید، لطفاً از سرپرست بخواهید تنظیمات ALLOWED_DOMAINS / ALLOW_LOCALNETWORKS / BLOCKED_DOMAINS را بررسی کند. migrate.invalid_local_path=مسیر محلی نامعتبر است. وجود ندارد یا یک پوشه نیست. -migrate.invalid_lfs_endpoint=نقطه پایانی LFS معتبر نیست +migrate.invalid_lfs_endpoint=نقطه پایانی LFS معتبر نیست migrate.failed=انتقال انجام نشد: %v migrate.migrate_items_options=نشانی دسترسی برای مهاجرت موارد اضافی مورد نیاز است migrated_from=مهاجرت از %[2]s @@ -898,7 +898,7 @@ migrate.gitea.description=مهاجرت داده از gitea.com یا پیاده migrate.gogs.description=مهاجرت داده از notabug.com یا پیاده‌سازی‌های دیگر Gogs. migrate.onedev.description=مهاجرت داده از code.onedev.io یا پیاده‌سازی‌های دیگر OneDev. migrate.codebase.description=مهاجر داده ها از codebasehq.com. -migrate.gitbucket.description=مهاجرت داده از نمونه های GitBucket +migrate.gitbucket.description=مهاجرت داده از نمونه های GitBucket migrate.migrating_git=انتقال داده های Git migrate.migrating_topics=موضوعات مهاجرت migrate.migrating_milestones=نقاط عطف مهاجرت @@ -951,7 +951,7 @@ release=نسخه منتشر شده releases=انتشارها tag=برچسب released_this=منتشر کرده است -file.title= %s در %s +file.title= %s در %s file_raw=خام file_history=تاریخچه file_view_source=نمایش منبع diff --git a/public/img/svg/gitea-vscodium.svg b/public/img/svg/gitea-vscodium.svg new file mode 100644 index 0000000000000..483676fe71f7e --- /dev/null +++ b/public/img/svg/gitea-vscodium.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index e1aa1c4f3b45b..8d7216c0dcb9e 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -126,6 +126,7 @@ {{svg "octicon-package" 16 "mr-3"}}{{.locale.Tr "repo.download_bundle"}} {{end}} {{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}} + {{svg "gitea-vscodium" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vscodium"}} {{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}} From 50c66b9e21084e96f031a22e808422ff574d7cda Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 15:49:59 +0300 Subject: [PATCH 02/12] Fix lint --- public/img/svg/gitea-vscodium.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/img/svg/gitea-vscodium.svg b/public/img/svg/gitea-vscodium.svg index 483676fe71f7e..9d63300053381 100644 --- a/public/img/svg/gitea-vscodium.svg +++ b/public/img/svg/gitea-vscodium.svg @@ -1 +1 @@ - \ No newline at end of file + From 76623d700d7cbb6db9bec24bdc3161daf7bb8c50 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 15:51:54 +0300 Subject: [PATCH 03/12] Fix correct branding --- options/locale/locale_en-US.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9d8694207bca0..1a86c93ff98a8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -848,7 +848,7 @@ fork_to_different_account = Fork to a different account fork_visibility_helper = The visibility of a forked repository cannot be changed. use_template = Use this template clone_in_vsc = Clone in VS Code -clone_in_vscodium = Clone in VS Codium +clone_in_vscodium = Clone in VSCodium download_zip = Download ZIP download_tar = Download TAR.GZ download_bundle = Download BUNDLE From 2774bce6d267ea5befe3f3bd6916baaf21e72f35 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 15:54:54 +0300 Subject: [PATCH 04/12] Revert fa-IR translation changes --- options/locale/locale_fa-IR.ini | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini index fa92b62df003a..a1e20b61dc9e9 100644 --- a/options/locale/locale_fa-IR.ini +++ b/options/locale/locale_fa-IR.ini @@ -664,10 +664,10 @@ delete_token=حذف access_token_deletion=حذف توکن delete_token_success=token مورد نظر حذف شد. برنامه هایی که از آن استفاده می‎کنند به زودی دسترسی به حساب کاربری شما را از دست می‎دهند. -manage_oauth2_applications=مدیریت برنامه‎های OAuth2 -edit_oauth2_application=ویرایش برنامه OAuth2 +manage_oauth2_applications=مدیریت برنامه‎های OAuth2 +edit_oauth2_application=ویرایش برنامه OAuth2 oauth2_applications_desc=برنامه‎های OAuth2 احراز هویت برنامه های شخص ثالث را با بستری امن میسر می‎کند. -remove_oauth2_application=حذف برنامه OAuth2 +remove_oauth2_application=حذف برنامه OAuth2 remove_oauth2_application_desc=حذف برنامه OAuth2 دسترسی تمام برنامه های متصل با آن را از بین می‎برد. آیا ادامه می‎دهید؟ remove_oauth2_application_success=برنامه حذف شده است. create_oauth2_application=ساختن یک برنامه OAuth2 جدید @@ -882,7 +882,7 @@ migrate.clone_local_path=یا مسیر سرویس دهنده محلی migrate.permission_denied=شما مجاز به واردات مخازن محلی نیستید. migrate.permission_denied_blocked=نمی‌توانید از میزبان‌های غیرمجاز وارد کنید، لطفاً از سرپرست بخواهید تنظیمات ALLOWED_DOMAINS / ALLOW_LOCALNETWORKS / BLOCKED_DOMAINS را بررسی کند. migrate.invalid_local_path=مسیر محلی نامعتبر است. وجود ندارد یا یک پوشه نیست. -migrate.invalid_lfs_endpoint=نقطه پایانی LFS معتبر نیست +migrate.invalid_lfs_endpoint=نقطه پایانی LFS معتبر نیست migrate.failed=انتقال انجام نشد: %v migrate.migrate_items_options=نشانی دسترسی برای مهاجرت موارد اضافی مورد نیاز است migrated_from=مهاجرت از %[2]s @@ -898,7 +898,7 @@ migrate.gitea.description=مهاجرت داده از gitea.com یا پیاده migrate.gogs.description=مهاجرت داده از notabug.com یا پیاده‌سازی‌های دیگر Gogs. migrate.onedev.description=مهاجرت داده از code.onedev.io یا پیاده‌سازی‌های دیگر OneDev. migrate.codebase.description=مهاجر داده ها از codebasehq.com. -migrate.gitbucket.description=مهاجرت داده از نمونه های GitBucket +migrate.gitbucket.description=مهاجرت داده از نمونه های GitBucket migrate.migrating_git=انتقال داده های Git migrate.migrating_topics=موضوعات مهاجرت migrate.migrating_milestones=نقاط عطف مهاجرت @@ -951,7 +951,7 @@ release=نسخه منتشر شده releases=انتشارها tag=برچسب released_this=منتشر کرده است -file.title= %s در %s +file.title= %s در %s file_raw=خام file_history=تاریخچه file_view_source=نمایش منبع From bee5cb28d382393943de96abe6c682c66e470ea3 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 18:29:01 +0300 Subject: [PATCH 05/12] Fix minimized SVG file --- public/img/svg/gitea-vscodium.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/img/svg/gitea-vscodium.svg b/public/img/svg/gitea-vscodium.svg index 9d63300053381..11f1a1913ccef 100644 --- a/public/img/svg/gitea-vscodium.svg +++ b/public/img/svg/gitea-vscodium.svg @@ -1 +1 @@ - + From 6e3f117919f454693cb78607cf26a65c0ffc4dda Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 18:31:32 +0300 Subject: [PATCH 06/12] Add SVG source file --- web_src/svg/gitea-vscodium.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 web_src/svg/gitea-vscodium.svg diff --git a/web_src/svg/gitea-vscodium.svg b/web_src/svg/gitea-vscodium.svg new file mode 100644 index 0000000000000..9d63300053381 --- /dev/null +++ b/web_src/svg/gitea-vscodium.svg @@ -0,0 +1 @@ + From 2a36491cbab09d140f181a2ee3beeeed188c0d63 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 19:10:20 +0300 Subject: [PATCH 07/12] Fix lint From 2c1e8e4a2ecd4f2cf39daabdb1cbc186a7bd404e Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 26 Oct 2022 21:58:27 +0300 Subject: [PATCH 08/12] Fix lint From 5ba32f1254b33d564fc06a9ac651a33ef790e079 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 4 Jan 2023 23:14:19 +0200 Subject: [PATCH 09/12] Update svg From 9ae8b9edc966beb96ddc803002724c77c0caae5b Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 4 Jan 2023 23:14:19 +0200 Subject: [PATCH 10/12] Update svg --- public/img/svg/gitea-vscodium.svg | 2 +- web_src/svg/gitea-vscodium.svg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/img/svg/gitea-vscodium.svg b/public/img/svg/gitea-vscodium.svg index 11f1a1913ccef..b12b0e3b13c8a 100644 --- a/public/img/svg/gitea-vscodium.svg +++ b/public/img/svg/gitea-vscodium.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/web_src/svg/gitea-vscodium.svg b/web_src/svg/gitea-vscodium.svg index 9d63300053381..e96edac664f16 100644 --- a/web_src/svg/gitea-vscodium.svg +++ b/web_src/svg/gitea-vscodium.svg @@ -1 +1,2 @@ + From 0ff9c4820483e206a64502a4942200c1f9cb6f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rychardt=20Rothw=C3=ABrkz?= Date: Thu, 5 Jan 2023 04:50:03 +0000 Subject: [PATCH 11/12] Fix button --- templates/repo/home.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 4d9a069b98ce7..7e05e3b0fc856 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -129,7 +129,7 @@ {{end}} {{end}} {{svg "gitea-vscode" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vsc"}} - {{svg "gitea-vscodium" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vscodium"}} + {{svg "gitea-vscodium" 16 "mr-3"}}{{.locale.Tr "repo.clone_in_vscodium"}} {{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}} From 166e63d9e0556b7e5d4a6b15da480214e6130c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rychardt=20Rothw=C3=ABrkz?= Date: Sun, 8 Jan 2023 02:12:17 +0000 Subject: [PATCH 12/12] Update clone script --- templates/repo/clone_script.tmpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/repo/clone_script.tmpl b/templates/repo/clone_script.tmpl index afd90040fb4e7..ae983e4ec50b8 100644 --- a/templates/repo/clone_script.tmpl +++ b/templates/repo/clone_script.tmpl @@ -24,5 +24,8 @@ for (const el of document.getElementsByClassName('js-clone-url-vsc')) { el['href'] = 'vscode://vscode.git/clone?url=' + encodeURIComponent(link); } + for (const el of document.getElementsByClassName('js-clone-url-vsx')) { + el['href'] = 'vscodium://vscode.git/clone?url=' + encodeURIComponent(link); + } })();