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

Suggestion: singularize count-per-tag (in Tags listings) to read "1 post" instead of "1 posts" #349

Closed
metaleap opened this issue Jul 1, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@metaleap
Copy link
Contributor

metaleap commented Jul 1, 2024

The basic idea: see title =)

To clarify the current situation:

image

@metaleap metaleap added the enhancement New feature or request label Jul 1, 2024
@welpo
Copy link
Owner

welpo commented Jul 1, 2024

Is this the /tags/ page? It works on the demo: https://welpo.github.io/tabi/tags/

@metaleap
Copy link
Contributor Author

metaleap commented Jul 1, 2024

Yes it is! That's so odd, has this been a very recent fix? I think my tabi copy is from about half a week, less than a week ago..

Anything missing in the config.toml, per chance?

(...)
taxonomies = [{ name = "tags", feed = false }]
(...)
menu = [
    { name = "Blog", url = "blog", trailing_slash = true },
    { name = "Topics", url = "tags", trailing_slash = true },
    { name = "CV", url = "cv", trailing_slash = true },
]
(...)

@welpo
Copy link
Owner

welpo commented Jul 1, 2024

has this been a very recent fix?

Nope. The current pluralisation method was added with #277, four months ago.

  • Have you modified anything in terms of i18n?
  • What's the default_language in config.toml?

@metaleap
Copy link
Contributor Author

metaleap commented Jul 1, 2024

Oh, interesting pointer! I do have a custom ./i18n/en.toml with a single line all_tags = "Blog post tags:". And guess what — when I disable it (renaming folder temporarily), the "1 post" show up correctly...

@welpo
Copy link
Owner

welpo commented Jul 1, 2024

As per the docs, you should copy the entire file and then customise it. I know it's not ideal, but there's no better way to do this right now.

If you copy the entire file and add/replace a string, everything should work as expected. The caveat is that future tabi updates which change i18n will require you to update the i18n files (or rely on the fallback strings, which work except for pluralisation).

@metaleap
Copy link
Contributor Author

metaleap commented Jul 1, 2024

Oh crikey, guess I missed that part! Thanks... would really be preferable if these toml file overrides would be merged on the fly, but I guess that's a Zola thing not a Tabi thing. Merci then!

@metaleap metaleap closed this as completed Jul 1, 2024
@welpo
Copy link
Owner

welpo commented Jul 1, 2024

Yeah, it's unfortunate. The current i18n setup is a huge hack and not how translations are supposed to work, but it's much better than the default setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants