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

Checks for start and end of parsing #16

Closed
JohannesDeml opened this issue Feb 8, 2019 · 2 comments
Closed

Checks for start and end of parsing #16

JohannesDeml opened this issue Feb 8, 2019 · 2 comments

Comments

@JohannesDeml
Copy link
Contributor

JohannesDeml commented Feb 8, 2019

I just had the problem that my localization filw was not parsed anymore, even though I just added three simple strings to the file. After quite a while I found the problem: One added ID was "ENDSCREEN_BUTTON", which triggered if(key.StartsWith("END")) in LocalizationImporter.cs.

I think another convention than checking if the string starts with END would be benefitial for the project. I suggest to check for an equals instead of using StartsWith(). To stay consistent I propose to do this change for the start as well. So the code would change to

if (!canBegin)
{
    if (key == "Polyglot" || key == "PolyMaster" || key == "BEGIN")
    {
        canBegin = true;
    }
    continue;
}

if (key == "END")
{
    break;
}

If this is in the interest of those involved I would create a PR for it :)

@skjalgsm
Copy link
Collaborator

skjalgsm commented Feb 8, 2019 via email

@JohannesDeml
Copy link
Contributor Author

Awesome, thanks for the quick response! ❤

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

No branches or pull requests

2 participants