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

made CORE_SRX_RULES_UNKNOWN_LANGUAGE_CODE log message better readable… #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zs-stpa
Copy link

@zs-stpa zs-stpa commented Oct 11, 2024

… by surrounding the faulty language code with quotes.

this only touches localized variants of the string, no code changes at all.

this is how it looked prior to the change with the example faulty language code 'Segmentierung der Textdateien'
Bildschirmfoto 2024-10-11 um 15 25 30

… by surrounding the faulty language code with quotes
@brandelune
Copy link

Nice catch. Would you mind changing the other bundles as well?

But the wording itself is strange. Why "unkown language code"? What does that refer to?
@miurahr do you have any idea?

@zs-stpa
Copy link
Author

zs-stpa commented Oct 11, 2024

Nice catch. Would you mind changing the other bundles as well?

french already had parentheses around the code and my editor only showed me escaped unicode for the japanese (where i imagine the code pops out naturally in contrast with kana and kanji) and no other bundles contained that string. so, thanks for asking but no thanks ^_^

But the wording itself is strange. Why "unkown language code"? What does that refer to? @miurahr do you have any idea?

this seems to only happen when there is something strange at the very bottom of the segmentation rules like this:
Bildschirmfoto 2024-10-11 um 17 45 46

@brandelune
Copy link

But the wording itself is strange. Why "unkown language code"? What does that refer to? @miurahr do you have any idea?

this seems to only happen when there is something strange at the very bottom of the segmentation rules like this:

What this shows is that the problematic "language code" is the second before last. And there is no "language code" attribute to that languagemap element. What is closest to a "language code" is the "languagepattern" attribute but I’m not seeing anything weird there.

@zs-stpa
Copy link
Author

zs-stpa commented Oct 12, 2024

But the wording itself is strange. Why "unkown language code"? What does that refer to? @miurahr do you have any idea?

this seems to only happen when there is something strange at the very bottom of the segmentation rules like this:

What this shows is that the problematic "language code" is the second before last. And there is no "language code" attribute to that languagemap element. What is closest to a "language code" is the "languagepattern" attribute but I’m not seeing anything weird there.

unclear where that languagerulename value came from, i probably typed something stupid when getting to know Ωt years ago and left it there because it never bothered me until now (had to finally convert from legacy version to current one). i am also unsure why the rule name should comply with language codes or names. possibly this was not the intended effect of that method, but this PR is only about readability of the log message itself, not about when or why it is emitted, the author of that lambda expression could maybe have a look at that.
Bildschirmfoto 2024-10-12 um 09 03 38
Bildschirmfoto 2024-10-12 um 09 03 12

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.

3 participants