Skip to content

Commit 92f48be

Browse files
authored
Merge pull request #2046 from wger-project/feature/add-languages
Add languages
2 parents 1c5eed5 + d176996 commit 92f48be

File tree

30 files changed

+15214
-3
lines changed

30 files changed

+15214
-3
lines changed

extras/authors/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# Generate authors list
22

33
This small script reads the commit information and generates a list of authors
4-
and links them to their Github profile, if available. This can be run before
4+
and links them to their GitHub profile, if available. This can be run before
55
each release to keep the data up to date.
66

77
## Usage
88

9-
Generate a token to avoid the rate limiting on the Github API:
9+
Note that you might run into rate-limiting issues if you run this script too
10+
often. If so, you can generate a token and use it in the script:
1011
<https://github.com/settings/personal-access-tokens> (no need to select any
1112
permissions, we're just performing reading operations on public data)
1213

1314
Run the script and optionally copy the generated files to their correct locations
15+
16+
```bash
17+
uv run generate_authors_api.py
18+
```

extras/authors/generate_authors_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
# Third Party
1010
import requests
1111

12+
# /// script
13+
# dependencies = [
14+
# "requests",
15+
# ]
16+
# ///
17+
1218
ORGANIZATION = 'wger-project'
1319
REPOSITORIES = ['wger', 'flutter', 'react', 'docker', 'docs']
1420
COMMITS_PER_PAGE = 100

wger/core/fixtures/languages.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,59 @@
214214
"full_name": "漢語",
215215
"full_name_en": "Chinese"
216216
}
217+
},
218+
{
219+
"model": "core.language",
220+
"pk": 25,
221+
"fields": {
222+
"short_name": "sk",
223+
"full_name": "Slovenský jazyk",
224+
"full_name_en": "Slovak"
225+
}
226+
},
227+
{
228+
"model": "core.language",
229+
"pk": 26,
230+
"fields": {
231+
"short_name": "sl",
232+
"full_name": "Slovenski jezik",
233+
"full_name_en": "Slovenian"
234+
}
235+
},
236+
{
237+
"model": "core.language",
238+
"pk": 27,
239+
"fields": {
240+
"short_name": "ko",
241+
"full_name": "한국어",
242+
"full_name_en": "Korean"
243+
}
244+
},
245+
{
246+
"model": "core.language",
247+
"pk": 28,
248+
"fields": {
249+
"short_name": "th",
250+
"full_name": "ภาษาไทย",
251+
"full_name_en": "Thai"
252+
}
253+
},
254+
{
255+
"model": "core.language",
256+
"pk": 29,
257+
"fields": {
258+
"short_name": "sr",
259+
"full_name": "српски језик",
260+
"full_name_en": "Serbian"
261+
}
262+
},
263+
{
264+
"model": "core.language",
265+
"pk": 30,
266+
"fields": {
267+
"short_name": "ta",
268+
"full_name": "தமிழ்",
269+
"full_name_en": "Tamil"
270+
}
217271
}
218272
]
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)