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

Localize "By" #530

Merged
merged 2 commits into from
Apr 7, 2022
Merged

Localize "By" #530

merged 2 commits into from
Apr 7, 2022

Conversation

regisphilibert
Copy link
Member

@regisphilibert regisphilibert commented Mar 21, 2022

If an author is set the page will mention them with the with the "By" preposition which had never been localized. I've proceeded to add it for the languages I'm familiar with.

If you've been mentioned in the following checklist, this means I identified you as the kind person(s) who initially or most recently updated the language's localization. Would you be kind enough to add you suggestion in the comments using this simple format: EN: By

If you have any reservations, for example the preposition needs to agree with gender or number in the given language, please let me also know in the comments.

Thank you all!

Fixes #528

En/De/Es/Fr/It/Pt

Fixes #528
@netlify
Copy link

netlify bot commented Mar 21, 2022

Deploy Preview for gohugo-ananke-theme-demo canceled.

Name Link
🔨 Latest commit ea43359
🔍 Latest deploy log https://app.netlify.com/sites/gohugo-ananke-theme-demo/deploys/624f2024e6da9500095b6a12

@michael-on-github
Copy link

UK:
(no preposition)

@winux1
Copy link
Contributor

winux1 commented Mar 22, 2022 via email

@eddex
Copy link
Contributor

eddex commented Mar 22, 2022

Hi there

It's true that I created quite a few translations in my commit a150063 when I localized the form-contact shortcode. But I used https://deepl.com for most translations including NL and RU, so unfortunately I can't help with those.

@ghost
Copy link

ghost commented Mar 23, 2022

JA:
(no preposition)

@xaner4
Copy link
Contributor

xaner4 commented Mar 24, 2022

NO: av

@larihuttunen
Copy link
Contributor

FI: Not Applicable

  • As the Finnish language is an agglutinative language, we have no prepositions.

https://en.wikipedia.org/wiki/Agglutinative_language

@evrifaessa
Copy link
Contributor

I think Turkish is a bit different than the others.

"Made by {{x}}" translates to "{{x}} tarafından yapıldı".

So the word is "tarafından". But the preposition comes before the verb, not the subject.

@regisphilibert
Copy link
Member Author

Thanks @mivanchenko @winux1 @eddex @ssatosays @xaner4 @larihuttunen!

@evrifaessa the theme omits the verb altogether by simple writing "By John Smith". Do you think there is an application in Turkish or should we just print the name alone, like in many languages it seems.

@evrifaessa
Copy link
Contributor

Thanks @mivanchenko @winux1 @eddex @ssatosays @xaner4 @larihuttunen!

@evrifaessa the theme omits the verb altogether by simple writing "By John Smith". Do you think there is an application in Turkish or should we just print the name alone, like in many languages it seems.

I think printing the name alone would be a better fit. Have a nice day :)

@regisphilibert
Copy link
Member Author

regisphilibert commented Mar 30, 2022

Thank you! Looking at this and the fact that Hugo will fallback on the english translation if not found, I don't think we have a clear way to use a word in certain language and no word in other... (Unless testing the current languages in two lists of languages etc... a route I'm not willing to take).

I'm contemplating removing By in every language. @budparr what do you think?

@budparr
Copy link
Member

budparr commented Mar 30, 2022

I'm fine with that. Is there a way to not have it, but for someone to add it if they wanted to?

@regisphilibert
Copy link
Member Author

regisphilibert commented Mar 30, 2022

I'm fine with that. Is there a way to not have it, but for someone to add it if they wanted to?

Not without overwriting the /layouts/posts/single.html, nope.

Only print a "by" for some languages
Add "by" template for easy overwrite
@regisphilibert
Copy link
Member Author

Lots of back and forth but I chose to maintain current use, so we do have an exception on some language (to omit the print of a string).
I also added a /_default/by.html template for straight forward overwrite by users.

@regisphilibert regisphilibert merged commit 8915e56 into master Apr 7, 2022
tstephen pushed a commit to tstephen/gohugo-theme-ananke that referenced this pull request Jun 9, 2022
* Localize "By" for some languages (En/De/Es/Fr/It/Pt/No) and wrap string in a dedicated template.

Fixes theNewDynamic#528
@davidsneighbour davidsneighbour deleted the 528-localize-by branch October 21, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"By" is not localised
8 participants