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

More colors for language bar / language mapping like linguist #10476

Closed
alexanderadam opened this issue Feb 26, 2020 · 4 comments · Fixed by #10906
Closed

More colors for language bar / language mapping like linguist #10476

alexanderadam opened this issue Feb 26, 2020 · 4 comments · Fixed by #10906
Labels
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/enhancement An improvement of existing functionality type/upstream This is an issue in one of Gitea's dependencies and should be reported there
Milestone

Comments

@alexanderadam
Copy link

alexanderadam commented Feb 26, 2020

First of all: it's awesome that @lafriks implemented this! 🙏

  • Gitea version (or commit ref): 1.12.0+dev-379-ge5944a952
  • Git version: -
  • Operating system: -
  • Database (use [x]): -
  • Can you reproduce the bug at https://try.gitea.io:
    • yes, simply explore try.gitea.io for more examples
  • Log gist: -

Description

Languages are perfectly recognized but some colors are missing.

Maybe it would need a mapping or so?
Some examples:

Detected language Possible color mapping
HTML+ERB HTML (example)
Haml HTML (example)
SCSS CSS (example)

Github uses groups for this and properties are inherited from the parent group. For example Haml inherits from HTML.

Screenshots

Screenshot_20200226_140920

Screenshot_20200226_141331

@guillep2k
Copy link
Member

As colors are provided by the enry library, this should be an upstream issue. Please report to: https://github.com/src-d/enry

func (stats LanguageStatList) loadAttributes() {
for i := range stats {
stats[i].Color = enry.GetColor(stats[i].Language)
}
}

I'm closing this.

@alexanderadam
Copy link
Author

alexanderadam commented Mar 16, 2020

@guillep2k shouldn't the issue kept open? I mean the issue is technically not closed and still present, right? Also it would still need the dependency update, once this issue is fixed in enry.

@lafriks lafriks reopened this Mar 16, 2020
@lafriks lafriks added type/enhancement An improvement of existing functionality status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR labels Mar 16, 2020
@guillep2k guillep2k added the type/upstream This is an issue in one of Gitea's dependencies and should be reported there label Mar 27, 2020
@alexanderadam
Copy link
Author

@lafriks, I can't emphasize this enough but you are simply awesome!

This issue should be fixed if someone is updating go-enry to 2.3.0.

@lafriks lafriks removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Mar 31, 2020
@lafriks lafriks added this to the 1.12.0 milestone Mar 31, 2020
@lafriks lafriks added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 31, 2020
@lafriks
Copy link
Member

lafriks commented Mar 31, 2020

Thanks :)

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/enhancement An improvement of existing functionality type/upstream This is an issue in one of Gitea's dependencies and should be reported there
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants