Skip to content

feat: Localized patch description and localized patch option descriptions #32

@LisoUseInAIKyrios

Description

@LisoUseInAIKyrios

Patch descriptions and options should be localizable, which means patches need to bundle their own English and localized text files.

 

Localized file types

The main file options are Json, property files, or xml, but only property and xml files have Java/Android built-in support to automatically load the correct localized resource for the environment:

// Loads the correct translation file for patches-strings.xml based on the device environment
val bundle = ResourceBundle.getBundle("patch-strings", locale)

 

How will patcher discovers the localized string files

To be determined.

Easiest is to use a fixed file name or a fixed sub directory inside the patches mpp file, and patcher always load patch string resource files from there.

 

Where do patches declare their strings?

To be determined.

The easiest is to have one language file for each language in a repo, and all patches declare their patch description and option descriptions inside that single English file. Using a single English file for an entire repo makes localization easy, and dramatically reduces the complexity at the cost that deleting a patch means being more careful cleaning up unused patch strings that may go unnoticed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions