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

po2prop ignore personality argument when processing strings file. #5247

Open
Jean-Daniel opened this issue May 6, 2024 · 2 comments
Open

Comments

@Jean-Daniel
Copy link

This is due to a bug in the convertstrings function. It calls convertprop with a fixed personality value instead of passing the personality argument.

def convertstrings(
    inputfile,
    outputfile,
    templatefile,
    personality="strings",
    includefuzzy=False,
    encoding=None,
    outputthreshold=None,
    remove_untranslated=False,
):
    """.strings specific convertor function."""
    return convertprop(
        inputfile,
        outputfile,
        templatefile,
        personality="strings",   # <-- Problem here: should be personality=personality
        includefuzzy=includefuzzy,
        encoding=encoding,
        outputthreshold=outputthreshold,
        remove_untranslated=remove_untranslated,
    )
@nijel
Copy link
Member

nijel commented May 6, 2024

Pull requests with fixes are welcome.

@alvinlazz
Copy link

alvinlazz commented Aug 30, 2024

def convertstrings(
    inputfile,
    outputfile,
    templatefile,
    personality="strings",
    includefuzzy=False,
    encoding=None,
    outputthreshold=None,
    remove_untranslated=False,
):
    """.strings specific convertor function."""
    return convertprop(
        inputfile,
        outputfile,
        templatefile,
        personality=personality,  # <-- Fixed: use the personality argument passed to the function
        includefuzzy=includefuzzy,
        encoding=encoding,
        outputthreshold=outputthreshold,
        remove_untranslated=remove_untranslated,
    )

I have made test case, its work perfect with jean's code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants