Closed weblate closed 7 months ago
@acolomb should we go for this as well before I test compile?
Sure, why not? Just for testing, you could merge the branch locally. Or just merge the PR and Weblate will open a new one whenever new translations come in.
@acolomb I cannot build atm, getting the following error. What do I need to do to correct this, please?
> Task :app:processDebugResources FAILED
BUILD FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR: \app\src\main\res\values\strings.xml:540:5-544:20: AAPT: error: resource string/notification_type_normal (aka com.github.catfriend1.syncthingandroid.debug:string/notification_type_normal) not found.
ERROR: \app\src\main\res\values\strings.xml:540:5-544:20: AAPT: error: resource string/notification_type_low_priority (aka com.github.catfriend1.syncthingandroid.debug:string/notification_type_low_priority) not found.
ERROR: \app\src\main\res\values\strings.xml:540:5-544:20: AAPT: error: resource string/notification_type_none (aka com.github.catfriend1.syncthingandroid.debug:string/notification_type_none) not found.
AFAICT there were never any strings related to notification_type_*
in app/src/res/values/strings.xml
, the English source language file.
Did you ever add them?
Ah, got it. That's something that got added upstream, and I carried it over as part of the string-array
replacement. But the fork seems to miss that functionality.
Should we remove the definitions from arrays.xml
? Or do you want to pull in the respective changes from upstream?
@acolomb Ah I see, so it can be commented out? I'll try and check compilation.
Now it compiles well with the one array related to notifications commented out.
Can I leave it like that? https://github.com/Catfriend1/syncthing-android/pull/1057
I have little knowledge about Android app development, so not sure about the Gradle warnings. But I've seem them on the upstream build as well, and it didn't hurt there. So, from my side it looks OK.
One more thing, I guess you haven't set up a Webhook for Weblate to pick up upstream changes immediately? That would be great to speed up propagation of new strings. See here:
https://docs.weblate.org/en/latest/admin/continuous.html#github-setup
@acolomb Can I do this webhook thingy alone? Or would it be better we meet up in Discord and do this together?
Hm... I think you can manage it according to the linked instructions. If not, sure we can connect up somehow. TeamViewer, Discord, whatever. I have a Discord account somewhere, but not actively using it.
What is the correct URL, docs state: https://hosted.weblate.org/hooks/github/ but the text says I need the weblate URL somehow. If I enter https://hosted.weblate.org/projects/syncthing/android/catfriend1/hooks/github/ it is 404.
I've added it now, without a secret. Not sure if this will work on the other side:
Looks good I guess. The https://hosted.weblate.org/hooks/github/
URL is correct, ast he note in the docs says. Weblate is a system which you can self-host, in which case you need to construct your own URL. But for Hosted Weblate, it's just the one listed in the docs.
How can we test communication on weblate side?
When you push a commit, it will trigger an update on Weblate automatically. You should see an entry in https://hosted.weblate.org/projects/syncthing/android/catfriend1/fork-stringsxml/#history
Ok, I'll change a string for testing and then back? Or does this wipe existing translations like Transifex did before so I'd better not do that test and check back next time?
No, simply do any commit on this repo as you would do anyway (doesn't need to touch any translations). Then check the Weblate history whether a notification was triggered.
No, translations are not overwritten when you change them here. What happens is that Weblate pulls in the Git commit and rebases its internal repo with translation commits onto that. Then it pushes the result to the PR branch. The rebasing can fail, however, if you are changing strings where users have already edited the translations. Or even if they're on the next / previous source line, causing Git to not cleanly merge the differences. That's why it helps to pull in translations before you start touching language files yourself, to avoid conflicting changes.
@acolomb Ok, thanks for the explanation. I'll try with a new string in https://github.com/Catfriend1/syncthing-android/pull/1058
@acolomb Cool, it worked :-).
@acolomb Is there a button "make new PR with updated translations now"?
Yes, there is, but only for project admins on Weblate. Let me see if I can assign that permission to you.
You should have access to this now: https://hosted.weblate.org/projects/syncthing/android/catfriend1/fork-stringsxml/#repository
Translations update from Hosted Weblate for Syncthing/Android app strings (fork).
It also includes following components:
Current translation status: