Commit Graph

6 Commits

Author SHA1 Message Date
KN4CK3R 5315153059
Use `Set[Type]` instead of `map[Type]bool/struct{}`. (#26804) 2023-08-30 06:55:25 +00:00
wxiaoguang de4a21fcb4
Refactor INI package (first step) (#25024)
The INI package has many bugs and quirks, and in fact it is
unmaintained.

This PR is the first step for the INI package refactoring: 

* Use Gitea's "config_provider" to provide INI access
* Deprecate the INI package by golangci.yml rule
2023-06-02 17:27:30 +08:00
wxiaoguang c2ff2a4724
Try to catch more broken translations (#23867)
Result: #23866

Gitea should drop the ``` ` ``` as string quoter, it is not recognized
by Crowdin and it causes problem for translators.
2023-04-03 11:12:47 +08:00
wxiaoguang 71afbcafa9
Improve backport-locales.go (#23807)
ps: there are more broken translation strings in 1.20 (main), most of
them are still caused by incorrect quoting/unquoting. For example,
translators might write text ``` `my text ```, such incorrect encoding
might break crowdin & Gitea's locale package.

In the future, a Go `update-locales.go` should replace the legacy
`update-locales.sh`.
2023-03-30 14:58:33 +08:00
wxiaoguang 5b5f7b756b
Clean some legacy files and move some build files (#23699)
* Clean the "tools" directory. The "tools" directory contains only two
files, move them.
* The "external_renderer.go" works like "cat" command to echo Stdin to
Stdout , to help testing.
* The `// gobuild: external_renderer` is incorrect, there should be no
space: `//gobuild: external_renderer`
* The `fmt.Print(os.Args[1])` is not a well-defined behavior, and it's
never used.
* The "watch.sh" is for "make watch", it's somewhat related to "build"
* After this PR, there is no "tools" directory, the project root
directory looks slightly simpler than before.
* Remove the legacy "contrib/autoboot.sh", there is no
"gogs_supervisord.sh"
* Remove the legacy "contrib/mysql.sql", it's never mentioned anywhere.
* Remove the legacy "contrib/pr/checkout.go", it has been broken for
long time, and it introduces unnecessary dependencies of the main code
base.
2023-03-25 16:22:51 -04:00
wxiaoguang 95818adb71
A tool to help to backport locales, changes source strings to fix other broken translations (#23633)
It use old en-US locales as reference, fill the old other locales with
new locales.

----

## More broken translations

Many translations are still broken. The reason is: at the last time
restoring the ini to crowdin, many semicolon are treated as comments.

Two kinds of broken strings:

### Some translations can be re-translated

<details>

```
skipping options/locale/locale_si-LK.ini org teams.add_nonexistent_repo
skipping options/locale/locale_tr-TR.ini repo commits.search.tooltip
skipping options/locale/locale_es-ES.ini repo settings.trust_model.committer.desc
skipping options/locale/locale_es-ES.ini admin dashboard.new_version_hint
skipping options/locale/locale_pt-PT.ini org teams.add_nonexistent_repo
skipping options/locale/locale_hu-HU.ini install require_sign_in_view_popup
skipping options/locale/locale_hu-HU.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini org teams.add_nonexistent_repo
skipping options/locale/locale_de-DE.ini repo settings.protect_protected_file_patterns_desc
```

</details>

So this PR also does some small changes on them, to trigger the
re-translation.

### The `locale_el-GR.ini` contains many broken tranlsations

I guess we should reset them from crowdin side, then translators can
re-translate them.

----

Update: in latest main, the strings have been fixed.

## TODO

Update: the el-GR translators have done great job and fixes these broken
translations.


<details>

Merge this PR ASAP and upload `locale_el-GR.ini` to crowdin to remove
broken strings.


Out-dated, fixed in main.


![image](https://user-images.githubusercontent.com/2114189/226954531-36e14527-278a-41a1-8ddb-2b2b27bfc746.png)

</details>

---------

Co-authored-by: delvh <dev.lh@web.de>
2023-03-23 13:27:03 -04:00