Skip to content

Multilanguage badges - #25244

Merged
sshane merged 62 commits into
masterfrom
multilanguage-badge
Jul 22, 2022
Merged

sshane merged 62 commits into
masterfrom
multilanguage-badge

Conversation

@sshane

@sshane sshane commented Jul 22, 2022

Copy link
Copy Markdown
Collaborator

We can just use the prebuilt docker once this is in master

Preview:

language
language
language

View README here.

@sshane
sshane force-pushed the multilanguage-badge branch from ebe3432 to 1fa46f6 Compare July 22, 2022 07:41
@sshane
sshane force-pushed the multilanguage-badge branch from 1fda7eb to ebf1bba Compare July 22, 2022 08:04
@pd0wm pd0wm added the docs label Jul 22, 2022
@sshane
sshane marked this pull request as ready for review July 22, 2022 10:01
Comment thread selfdrive/ui/translations/create_badges.py Outdated
@sshane

sshane commented Jul 22, 2022

Copy link
Copy Markdown
Collaborator Author

@adeebshihadeh we need something like https://pypi.org/project/svgutils/ if you want to concatenate svgs and do the proper newline adjustments once we have more languages that would be too wide for the README width, are you okay with that?

Adjusting with raw python or an XML library is do-able but I feel it'd be a lot of code (need to adjust main document size dynamically, add padding, move over badges to proper x, newline, etc)

@sshane
sshane force-pushed the multilanguage-badge branch from cc8781d to e4f15a7 Compare July 22, 2022 20:34
@sshane

sshane commented Jul 22, 2022

Copy link
Copy Markdown
Collaborator Author

Will merge as-is now, I'll think about automatically adding or combining the svgs when we add our next language.

Right now the script outputs the badges to copy+paste:

Copy into selfdrive/ui/translations/README.md:

[![language]([https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_zh-CHT.svg)](main_zh-CHT.ts](https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_zh-CHT.svg](main_zh-CHT.ts)))
[![language]([https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_zh-CHS.svg)](main_zh-CHS.ts](https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_zh-CHS.svg](main_zh-CHS.ts)))
[![language]([https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_ko.svg)](main_ko.ts](https://github.com/ghraw/commaai/openpilot/badges/translation_badge_main_ko.svg](main_ko.ts)))

@sshane
sshane merged commit 9ab1c49 into master Jul 22, 2022
@sshane
sshane deleted the multilanguage-badge branch July 22, 2022 21:07
66thparallel pushed a commit to 66thparallel/janes_openpilot_fork that referenced this pull request May 1, 2026
* Test badge

* fix?

* Test

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* try this

* need to build

* a minute for what

* download and commit test badge

* get dynamically

* fix

* Add to readme

* force push

* should work

* one step

* Update badge

* draft

* clean up

* remove these

* one line is fine

* Adding badges will have to be manual, but that should be fine

* cause error

* continue on error

* hope this doesn't delete the badges

* ugh, allow-failures would be so nice

* whoops

* yep need this

* do this

* now try a push

* clean up

* rm line

* need this

* see if this works

* orange

* does this work?

* ?

* do dis

* needs to be global?

* cool, this works

cool, this works

* run only on master

* add back workflows

* remove that

* sorting

* sorting

* print badge markdown

* it is bytes though?

* run once more

* revert

* looks nicer

* strange

* no decimals

* run again

run once more

* nice workflow_dispatch

* only run on a schedule and remove error handling

* make links absolute

* adjust badge text
old-commit-hash: 9ab1c49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants