Skip to content

Conversation

@Jaehyuk-Lee
Copy link

@Jaehyuk-Lee Jaehyuk-Lee commented Jan 15, 2026

f285d76: coverage.ts detects language from the web browser.
c0cf1de: fix Korean translation
8cbefb1: remove languagesArr parameter from browserLanguagesToLang function.

Removing languagesArr parameter

Current Situation

The browserLanguagesToLang function has a comment saying it only takes navigator.languages as input. But it still receives this value as a parameter, which is unnecessary.

Option 1: Remove the parameter

If the function only handles navigator.languages, we can remove the parameter and use navigator.languages directly inside the function.

Option 2: Generalize the function

If we want to support other locale arrays beyond navigator.languages, we could keep the parameter and rename the function to localesToLang. This makes it clear that the function converts any locale array to a cactbot language.


This PR implements Option 1. Let me know if Option 2 is preferred.

@github-actions github-actions bot added resources /resources util /util needs-review Awaiting review raidemulator /ui/raidemulator module labels Jan 15, 2026
@Jaehyuk-Lee
Copy link
Author

Jaehyuk-Lee commented Jan 15, 2026

By the way, this should not be deleted.

image

ACT web browser

Because you cannot change the language setting of the ACT web browser (I would call this way).
image

@valarnin
Copy link
Collaborator

I think that option 2 is better from a logic standpoint, with a wrapper for pulling from browser navigator.languages, for CLI and testing purposes, e.g.:

export const localesToLang = (locales: readonly string[]): Lang => {
// ...
};

export const browserLanguagesToLang = (): Lang => localesToLang(navigator.languages);

But this is pretty subjective.

@Jaehyuk-Lee
Copy link
Author

@valarnin

I think that option 2 is better from a logic standpoint, with a wrapper for pulling from browser navigator.languages, for CLI and testing purposes

That's a fair point. I hard-coded 'ko' when I tested oopsy on #947.

Copy link
Collaborator

@valarnin valarnin left a comment

Choose a reason for hiding this comment

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

Because you cannot change the language setting of the ACT web browser

Can you file an issue on the OverlayPlugin repo for this and I'll see about tackling it towards the end of the expansion, if it's even possible?

@github-actions github-actions bot removed the needs-review Awaiting review label Jan 19, 2026
@xiashtra xiashtra merged commit e14eec1 into OverlayPlugin:main Jan 20, 2026
11 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 20, 2026
#946)

f285d76: `coverage.ts` detects language
from the web browser.
c0cf1de: fix Korean translation
8cbefb1: remove `languagesArr`
parameter from `browserLanguagesToLang` function.

## Removing `languagesArr` parameter

### Current Situation
The `browserLanguagesToLang` function has a comment saying it only takes
`navigator.languages` as input. But it still receives this value as a
parameter, which is unnecessary.

### Option 1: Remove the parameter
If the function only handles `navigator.languages`, we can remove the
parameter and use `navigator.languages` directly inside the function.

### Option 2: Generalize the function
If we want to support other locale arrays beyond `navigator.languages`,
we could keep the parameter and rename the function to `localesToLang`.
This makes it clear that the function converts any locale array to a
cactbot language.

---

This PR implements Option 1. Let me know if Option 2 is preferred. e14eec1
github-actions bot pushed a commit to ShadyWhite/cactbot that referenced this pull request Jan 20, 2026
OverlayPlugin#946)

f285d76: `coverage.ts` detects language
from the web browser.
c0cf1de: fix Korean translation
8cbefb1: remove `languagesArr`
parameter from `browserLanguagesToLang` function.

## Removing `languagesArr` parameter

### Current Situation
The `browserLanguagesToLang` function has a comment saying it only takes
`navigator.languages` as input. But it still receives this value as a
parameter, which is unnecessary.

### Option 1: Remove the parameter
If the function only handles `navigator.languages`, we can remove the
parameter and use `navigator.languages` directly inside the function.

### Option 2: Generalize the function
If we want to support other locale arrays beyond `navigator.languages`,
we could keep the parameter and rename the function to `localesToLang`.
This makes it clear that the function converts any locale array to a
cactbot language.

---

This PR implements Option 1. Let me know if Option 2 is preferred. e14eec1
@Jaehyuk-Lee Jaehyuk-Lee deleted the coverage branch January 20, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💬ko raidemulator /ui/raidemulator module resources /resources util /util

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants