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

data: Fix translation related issues #465

Merged
merged 4 commits into from Sep 1, 2023
Merged

data: Fix translation related issues #465

merged 4 commits into from Sep 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Aug 31, 2023

data: Remove non-exist file from POTFILES

  • Remove LockableToogleButton.vala from the POTFILES. This file seems not exist and blocks the POT file updates.

data: update the POTFILES

  • Order entries alphabetically respecting folder structures.
  • Remove unused files.

Remove LockableToogleButton.vala from the POTFILES
@ghost ghost changed the title data: Remove non-exist file from POTFILES data: Fix translation related issues Aug 31, 2023
Order entries alphabetically respecting folder structures. Remove unused files.
@GeopJr
Copy link
Owner

GeopJr commented Sep 1, 2023

Thanks for this PR!

Would you mind somewhat automating it instead of keeping track of every file manually?
Something like: find -iname "*.ui" -o -iname "*.vala" -o -iname "*.in" | sort

edit: Please also keep in mind that similarly to the comment on the linked issue, usually the POTFILES file also gets updated when we are close to a release

@ghost
Copy link
Author

ghost commented Sep 1, 2023

You can create a bash script (sh) file on the main directory of your project containing this entries

#!/bin/bash

find ./ -type f -name "*.in" | sort > po/POTFILES
echo "" >> po/POTFILES
find ./ -type f -name "*.ui" -exec grep -l "translatable=\"yes\"" {} \; | sort >> po/POTFILES
echo "" >> po/POTFILES
find ./ -type f -name "*.vala" -exec grep -l "_(\"" {} \; | sort >> po/POTFILES

@GeopJr
Copy link
Owner

GeopJr commented Sep 1, 2023

LGTM thanks!

I added the script and ran it

@GeopJr GeopJr merged commit 62b4301 into GeopJr:main Sep 1, 2023
4 checks passed
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.

1 participant