mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Backport #21597 Related: * https://github.com/go-gitea/gitea/pull/21596#issuecomment-1291450224 There was a bug when switching language by AJAX: the irrelevant POST requests were processed by the target page's handler. Now, use GET instead of POST. The GET requests should be harmless. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -37,7 +37,7 @@ export function initHeadNavbarContentToggle() {
 | 
				
			|||||||
export function initFootLanguageMenu() {
 | 
					export function initFootLanguageMenu() {
 | 
				
			||||||
  function linkLanguageAction() {
 | 
					  function linkLanguageAction() {
 | 
				
			||||||
    const $this = $(this);
 | 
					    const $this = $(this);
 | 
				
			||||||
    $.post($this.data('url')).always(() => {
 | 
					    $.get($this.data('url')).always(() => {
 | 
				
			||||||
      window.location.reload();
 | 
					      window.location.reload();
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user