Skip to content

Downloading translations and ignoring branch at Crowdin #2592

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

Closed
wants to merge 25 commits into from

Conversation

jonasfranz
Copy link
Member

@jonasfranz jonasfranz commented Sep 23, 2017

This PR adds the following build steps:

  • download_translations: Downloads & exports all translations from crowdin and saves them into options/locale/
  • upload_translations: Uploads the updated locale_en-US.ini to Crowdin

The build steps are splitted because the files should only uploaded to crowdin if all test passes.

It also adds the ignore_branch option to fix the build process because gitea does not use branches at crowdin.

This is already tested here:

Related to #2585
Related to jonasfranz/drone-crowdin#2

@codecov-io
Copy link

codecov-io commented Sep 23, 2017

Codecov Report

Merging #2592 into master will decrease coverage by 0.41%.
The diff coverage is 2.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2592      +/-   ##
==========================================
- Coverage   27.38%   26.96%   -0.42%     
==========================================
  Files          86       87       +1     
  Lines       17010    17297     +287     
==========================================
+ Hits         4658     4664       +6     
- Misses      11673    11953     +280     
- Partials      679      680       +1
Impacted Files Coverage Δ
models/repo_branch.go 8.73% <0%> (-24.61%) ⬇️
models/repo_activity.go 0% <0%> (ø)
models/error.go 18.93% <0%> (-1%) ⬇️
routers/user/setting.go 0% <0%> (ø) ⬆️
modules/validation/binding.go 100% <100%> (ø) ⬆️
models/repo.go 13.12% <5.4%> (-0.02%) ⬇️

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 a4cd461...fe8c55f. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 23, 2017
@lafriks
Copy link
Member

lafriks commented Sep 23, 2017

I don't quite see point in downloading translations from crowdin. As we need to get these translations in git

@lunny
Copy link
Member

lunny commented Sep 24, 2017

Two options, one is manually download crowdin languages packs and send a PR, another is remove all language packs except en-US and download it before build.

@jonasfranz
Copy link
Member Author

@lunny @lafriks I think that we need a combination out of both. So if you release a new version you should download the translations manually. If you build a master version you will get the translations on the fly via the build process.

@lafriks
Copy link
Member

lafriks commented Sep 25, 2017

@JonasFranzDEV I like @tboerger idea that appleboy/drone-git-push could be used to push downloaded files to git

@tboerger
Copy link
Member

@JonasFranzDEV I like @tboerger idea that appleboy/drone-git-push could be used to push downloaded files to git

In reference to #2585 (comment)

@jonasfranz
Copy link
Member Author

@tboerger @lafriks I've added the git push part. The translations will be updated on GitHub too now.

.drone.yml Outdated
image: appleboy/drone-git-push
pull: true
secrets: [ git_push_ssh_key ]
remote: "[email protected]:go-gitea/gitea.git"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need the remote

.drone.yml Outdated
pull: true
secrets: [ git_push_ssh_key ]
remote: "[email protected]:go-gitea/gitea.git"
branch: master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch should be already master?

.drone.yml Outdated

translations:

github:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems not related?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonasFranzDEV why this section is needed here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lunny @lafriks As you can see in comments: this was a merge from master to pr branch. Think a full rebase is necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daviian What should I do for a "full rebase"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git rebase master?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonasFranzDEV Usually I rebase my master to be the same as upstream/master (original gitea remote) and after checking out my pr branch I do it like @Morlinest said.

lunny and others added 15 commits October 14, 2017 22:37
* remove orgnization watch repositories

* fix migration

* fix typo and missing change

* remove unused code
…o-gitea#2678)

* Allow custom SSH user in UI for built-in SSH server (go-gitea#2617)

* Some fixes

* Did make fmt

* Updated according to review

- Renamed config to BUILTIN_SSH_SERVER_USER
- Removed unnecessary default string value for config item

* Updated according to review

* Fixed some minor issues
* Add Activity page to repository

* Add request data for activity

* Add issue data for activity

* Add user unit right checks

* Add releases to activity

* Log repository unit loading error
…ions (go-gitea#2699)

* Fix so that user can still fork his own repository to his organizations

* Fix to only use owned organizations

* Add integration test for forking own repository to owned organization
* provide both possible authentication solutions

Signed-off-by: David Schneiderbauer <[email protected]>
* Create new branch from branch selection dropdown and rewrite it to VueJS

* Make updateLocalCopyToCommit as not exported

* Move branch name validation to model

* Fix possible race condition
* Integration test for activity page

* Small code refactoring for acitvity page

* Move activity stats calculation logic to model
…2705)

* fix plain readme didn't render correctly on repo home page

* fix missing render

* remove unused template variables
…o-gitea#2710)

* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user

* Fix multi-actions in PR page

* Change error message

* Fix comment update and delete functionality in PR
* merge password and 2fa page on user settings
@jonasfranz
Copy link
Member Author

I've fully rebased it onto master. @Morlinest

@Morlinest
Copy link
Member

I think something is wrong, 51 files changed.

@daviian
Copy link
Member

daviian commented Oct 17, 2017

@JonasFranzDEV Was your pr branch created from master!?

@jonasfranz
Copy link
Member Author

Replaced by #2727

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants