Skip to content

Conversation

sdsantos
Copy link
Contributor

@sdsantos sdsantos commented Mar 3, 2025

We were having issues with locales from Transifex and Google Play or the Apple App Store:

  • fastlane didn't support having unknown locales in its metadata folder
  • some locales use different names for each store: es or es-ES for example
  • we also had situations like pt-rBR needed to become pt-BR (transifex doesn't let us have different locale mappings for different files)

So, to address this, I created a new root metadata folder that will sync with Transifex. And inside the fastlane/metadata folder we only have symbolic links to the locales we want in the stores. It works both ways. Screenshots taken by fastlane end up in the root metadata folder too.

Not sure if this solves the default changelogs upload. If not, I'll need to create symbolic links for the default changelogs file for each locale 😢.

@sdsantos sdsantos requested a review from aanorbel March 3, 2025 19:31
@aanorbel
Copy link
Member

aanorbel commented Mar 3, 2025

I understand the problem being solved here.
We need to account for f-droid metadata and flavor placement. https://gitlab.com/fdroid/fdroidserver/-/issues/829

Will go through and try to make some suggestions.

@aanorbel
Copy link
Member

aanorbel commented Mar 4, 2025

Were going to take the fdroidclient repo as a template. https://gitlab.com/fdroid/fdroidclient/-/tree/master/src . They have 2 flavors full and basic.

We would need to emulate 2 flavors ooni and dw that serves the same function.

  • src/ooni/fastlane/metadata/android
  • src/dw/fastlane/metadata/android

The path above is required so f-droid can pick it up. Refer to https://gitlab.com/fdroid/fdroidserver/-/issues/829 for more information

We can add something like this to allow f-droid builld by the flavor name or find a way to include the gradle property as a flag for f-droid builds.

tasks.register("assembleOoniRelease", Exec::class) {
    group = "build"
    description = "Assembles a release build with OONI branding"
    workingDir = rootDir

    val isWindows = System.getProperty("os.name").lowercase().contains("windows")
    val gradlewExecutable = if (isWindows) "gradlew.bat" else "./gradlew"

    commandLine(
        gradlewExecutable,
        "assembleFdroidRelease",
        "-Porganization=ooni"
    )
}

tasks.register("assembleDwRelease", Exec::class) {
    group = "build"
    description = "Assembles a release build with DW branding"
    workingDir = rootDir

    val isWindows = System.getProperty("os.name").lowercase().contains("windows")
    val gradlewExecutable = if (isWindows) "gradlew.bat" else "./gradlew"

    commandLine(
        gradlewExecutable,
        "assembleFdroidRelease",
        "-Porganization=dw"
    )
}

@sdsantos
Copy link
Contributor Author

sdsantos commented Mar 4, 2025

Added a symbolic link to make fastlane/metadata/android point to fastlane/metadata/ooni/android for f-droid.

Copy link
Member

@aanorbel aanorbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐳

@sdsantos sdsantos merged commit 24b9a48 into main Mar 4, 2025
7 checks passed
@sdsantos sdsantos deleted the fix-metadata-locales branch March 4, 2025 11:48
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.

2 participants