Skip to content

Commit

Permalink
improv: use Intl instead of conspired/i18n-iso-languages
Browse files Browse the repository at this point in the history
  • Loading branch information
imLinguin committed Nov 17, 2023
1 parent 6916885 commit eb3a2f8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
}
},
"dependencies": {
"@cospired/i18n-iso-languages": "^4.1.0",
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
"@felipecrs/decompress-tarxz": "4.0.0",
Expand Down
6 changes: 2 additions & 4 deletions src/backend/storeManagers/gog/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
gogSupportPath,
isWindows
} from '../../constants'
import languages from '@cospired/i18n-iso-languages'
import { getWinePath, runWineCommand, verifyWinePrefix } from '../../launcher'
import { logFileLocation } from 'backend/storeManagers/storeManagerCommon/games'
import { getGameInfo as getGogLibraryGameInfo } from 'backend/storeManagers/gog/library'
Expand Down Expand Up @@ -131,9 +130,8 @@ async function setup(
const gameSupportDir = path.join(gogSupportPath, appName) // This doesn't need to exist, scriptinterpreter.exe will handle it gracefully

const installLanguage = gameInfo.install.language?.split('-')[0]
// FIXME: When Node 20 hits LTS channel replace this with implementation Intl
// less dependencies = good
const lang: string | undefined = languages.getName(installLanguage!, 'en')
const languages = new Intl.DisplayNames(['en'], { type: 'language' })
const lang: string | undefined = languages.of(installLanguage!)

const dependencies: string[] = []
const gameDirectoryPath = await getWinePath({
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,6 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@cospired/i18n-iso-languages@^4.1.0":
version "4.1.0"
resolved "https://registry.yarnpkg.com/@cospired/i18n-iso-languages/-/i18n-iso-languages-4.1.0.tgz#af47d146b1e21d47038caa028c37e0b2ce57bc4d"
integrity sha512-5+JK7YiO9r/FmwtlEPL1tQNt04/9AuN1t9GO/0C2yitqhKwFRa1r7VohNNUnFgB84MW5v4Lwq8ZAUZexuJh1nQ==

"@develar/schema-utils@~2.6.5":
version "2.6.5"
resolved "https://registry.yarnpkg.com/@develar/schema-utils/-/schema-utils-2.6.5.tgz#3ece22c5838402419a6e0425f85742b961d9b6c6"
Expand Down

0 comments on commit eb3a2f8

Please sign in to comment.