Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default language to first element of LANGS #14846

Closed
wants to merge 2 commits into from

Conversation

6543
Copy link
Member

@6543 6543 commented Mar 2, 2021

The first element of LANGS in [i18n] section will be teh default language.
Witch is used if no language is set to translate strings.

@6543 6543 added type/enhancement An improvement of existing functionality modifies/translation labels Mar 2, 2021
@techknowlogick
Copy link
Member

CI fail is related.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 2, 2021
@zeripath

This comment has been minimized.

modules/setting/setting.go Outdated Show resolved Hide resolved
@6543 6543 added the pr/wip This PR is not ready for review label Mar 8, 2021
@6543 6543 mentioned this pull request Mar 20, 2021
5 tasks
@6543 6543 added this to the 1.15.0 milestone Mar 20, 2021
@6543 6543 requested a review from lafriks March 21, 2021 08:57
@6543 6543 removed the pr/wip This PR is not ready for review label Mar 21, 2021
@zeripath

This comment has been minimized.

@6543

This comment has been minimized.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 21, 2021
@6543 6543 changed the title Make Default Language Settable Set default language to first element of LANGS Mar 21, 2021
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@2f0eb9f). Click here to learn what that means.
The diff coverage is 100.00%.

❗ Current head 69d79d0 differs from pull request most recent head 10e22f6. Consider uploading reports for the commit 10e22f6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##             master   #14846   +/-   ##
=========================================
  Coverage          ?   42.10%           
=========================================
  Files             ?      777           
  Lines             ?    83394           
  Branches          ?        0           
=========================================
  Hits              ?    35116           
  Misses            ?    42573           
  Partials          ?     5705           
Impacted Files Coverage Δ
modules/translation/translation.go 75.67% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f0eb9f...10e22f6. Read the comment docs.

@lafriks
Copy link
Member

lafriks commented Mar 21, 2021

I don't think that's correct currently you are changing not default user language but fallback language that is not guaranteed to be 100% completed (translated) if you change default user language to something other

@6543
Copy link
Member Author

6543 commented Mar 21, 2021

you are right :/ ... I should call it Fallback and change it in this direction

@lafriks
Copy link
Member

lafriks commented Mar 21, 2021

But is this really needed? What will happen if fallback language is missing translations?

@6543
Copy link
Member Author

6543 commented Mar 21, 2021

But is this really needed? What will happen if fallback language is missing translations?

-> as you suggested it's english again

@6543 6543 added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Mar 21, 2021
@6543
Copy link
Member Author

6543 commented Mar 21, 2021

As per discord: since this only cover edge case, just go with eng

@6543 6543 closed this Mar 21, 2021
@6543 6543 deleted the i18n-flush branch March 21, 2021 11:58
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/translation status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants