]> source.dussan.org Git - gitea.git/commitdiff
Fix blame page select range error and some typos (#19503)
authorLunny Xiao <xiaolunwen@gmail.com>
Tue, 26 Apr 2022 19:19:52 +0000 (03:19 +0800)
committerGitHub <noreply@github.com>
Tue, 26 Apr 2022 19:19:52 +0000 (20:19 +0100)
Partially back port from #19500 and fix two typos.

docs/content/doc/installation/with-docker.fr-fr.md
models/migrations/migrations.go
web_src/js/features/repo-code.js

index 0011ba2ff442c2493a54bbd7aa6cd1efd4351032..176abf7a129d857f520105db9e07ed0446aa6da1 100644 (file)
@@ -43,7 +43,7 @@ Vous devriez avoir une instance fonctionnelle de Gitea. Pour accèder à l'inter
 
 ## Named Volumes
 
-Ce guide aboutira à une installation avec les données Gita et PostgreSQL stockées dans des volumes nommés. Cela permet une sauvegarde, une restauration et des mises à niveau en toute simplicité.
+Ce guide aboutira à une installation avec les données Gitea et PostgreSQL stockées dans des volumes nommés. Cela permet une sauvegarde, une restauration et des mises à niveau en toute simplicité.
 
 ### The Database
 
index 31b172a68d66f6bfc6c4d44bf3d9df8c81c684b7..6dff3e055b0bbc84ed6c4b1f13422bd7208bdf30 100644 (file)
@@ -453,7 +453,7 @@ Please try upgrading to a lower version first (suggested v1.6.4), then upgrade t
 
        // Downgrading Gitea's database version not supported
        if int(v-minDBVersion) > len(migrations) {
-               msg := fmt.Sprintf("Your database (migration version: %d) is for a newer Gita, you can not use the newer database for this old Gitea release (%d).", v, minDBVersion+len(migrations))
+               msg := fmt.Sprintf("Your database (migration version: %d) is for a newer Gitea, you can not use the newer database for this old Gitea release (%d).", v, minDBVersion+len(migrations))
                msg += "\nGitea will exit to keep your database safe and unchanged. Please use the correct Gitea release, do not change the migration version manually (incorrect manual operation may lose data)."
                if !setting.IsProd {
                        msg += fmt.Sprintf("\nIf you are in development and really know what you're doing, you can force changing the migration version by executing: UPDATE version SET version=%d WHERE id=1;", minDBVersion+len(migrations))
index 96a923571f430e06dc808dc066da2e60d93a9cd9..eee239177bd3bfc6c9fb6ae630086bd07920ab66 100644 (file)
@@ -15,10 +15,6 @@ function selectRange($list, $select, $from) {
   const $issue = $('a.ref-in-new-issue');
   const $copyPermalink = $('a.copy-line-permalink');
 
-  if ($copyPermalink.length === 0) {
-    return;
-  }
-
   const updateIssueHref = function (anchor) {
     if ($issue.length === 0) {
       return;
@@ -29,6 +25,9 @@ function selectRange($list, $select, $from) {
   };
 
   const updateCopyPermalinkHref = function(anchor) {
+    if ($copyPermalink.length === 0) {
+      return;
+    }
     let link = $copyPermalink.attr('data-clipboard-text');
     link = `${link.replace(/#L\d+$|#L\d+-L\d+$/, '')}#${anchor}`;
     $copyPermalink.attr('data-clipboard-text', link);