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

Update french translation / modification def dayssince in duration.py #566

Merged
merged 2 commits into from Oct 14, 2023

Conversation

Anoerak
Copy link
Contributor

@Anoerak Anoerak commented Nov 1, 2022

Update of the french translation (corrections and adds) + modification of the
'def dayssince(value, today=None)' by replacing the value of line 118 with a variable in line 110 which will make the tranlsation easier for the future.

@Anoerak
Copy link
Contributor Author

Anoerak commented Nov 1, 2022

I think I know why the def dayssince test failed.
Since I changed the def and replace the return with a variable build as
days_ago = _(" ") + str(delta.days) + _(" days ago")
in order to ease the translation (in french, we would replace the " " by "il y a " and the " days ago" by " jours"), I needed to modify the expected results of the test from "x days ago" to " x days ago".
Should I close this PR and submit a new one with the corrected test?

@cdubz
Copy link
Member

cdubz commented Nov 2, 2022

@Anoerak I think the approach we should take here instead is to bring the str(delta_days) in to the translatable string -- then you'll be able to put whatever you want before it without the filler space.

E.g. _("%(days_ago)s days ago") % {"days_ago": str(delta.days)}

@Anoerak
Copy link
Contributor Author

Anoerak commented Nov 2, 2022

Ok.
I'll look into that this weekend.

@cdubz
Copy link
Member

cdubz commented Feb 10, 2023

@Anoerak 👋 Still looking to contribute to this branch?

@cdubz cdubz marked this pull request as draft February 10, 2023 14:26
@Anoerak
Copy link
Contributor Author

Anoerak commented Mar 13, 2023

Hi @cdubz ,
Sorry, things have been busy here :)
I've to meet some deadlines on a current project and will jump back on this branch right after if that's OK with you.

@cdubz
Copy link
Member

cdubz commented Mar 13, 2023

Yep that’s fine. No worries!

@cdubz cdubz marked this pull request as ready for review October 14, 2023 13:48
@coveralls
Copy link

Coverage Status

coverage: 98.94% (-0.04%) from 98.976% when pulling 9f33296 on Anoerak:master into 0c15868 on babybuddy:master.

@cdubz cdubz added enhancement Feature requests or improvements to existing functionality i18n/L10n Issues relating to internationalization and/or localization labels Oct 14, 2023
@cdubz cdubz added this to the 2.1.2 milestone Oct 14, 2023
@cdubz
Copy link
Member

cdubz commented Oct 14, 2023

Thanks for you work here, @Anoerak! I only took this over because of the related #718 change.

@cdubz cdubz merged commit 03f3197 into babybuddy:master Oct 14, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements to existing functionality i18n/L10n Issues relating to internationalization and/or localization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants