Merge branch 'misskey-develop' into merge/2025-03-24

# Conflicts:
#	.github/workflows/api-misskey-js.yml
#	.github/workflows/changelog-check.yml
#	.github/workflows/check-misskey-js-autogen.yml
#	.github/workflows/get-api-diff.yml
#	.github/workflows/lint.yml
#	.github/workflows/locale.yml
#	.github/workflows/on-release-created.yml
#	.github/workflows/storybook.yml
#	.github/workflows/test-backend.yml
#	.github/workflows/test-federation.yml
#	.github/workflows/test-frontend.yml
#	.github/workflows/test-misskey-js.yml
#	.github/workflows/test-production.yml
#	.github/workflows/validate-api-json.yml
#	locales/index.d.ts
#	package.json
#	packages/misskey-js/generator/package.json
#	packages/misskey-js/package.json
#	pnpm-lock.yaml
#	scripts/changelog-checker/package-lock.json
#	scripts/changelog-checker/package.json
This commit is contained in:
Hazelnoot 2025-04-01 09:58:59 -04:00
commit 7ff15816d1
35 changed files with 716 additions and 379 deletions

View file

@ -37,11 +37,6 @@ export const searchIndexes: SearchIndexItem[] = [
label: i18n.ts.themeForDarkMode,
keywords: ['dark', 'theme'],
},
{
id: '8wcoRp76b',
label: i18n.ts.setWallpaper,
keywords: ['wallpaper'],
},
],
label: i18n.ts.theme,
keywords: ['theme'],
@ -861,40 +856,45 @@ export const searchIndexes: SearchIndexItem[] = [
keywords: ['sync', 'profiles', 'devices'],
},
{
id: 'iEF0gqNAo',
id: 'wWH4pxMQN',
label: i18n.ts._deck.useSimpleUiForNonRootPages,
keywords: ['ui', 'root', 'page'],
},
{
id: 'BNdSeWxZn',
id: '3LR509BvD',
label: i18n.ts.defaultNavigationBehaviour,
keywords: ['default', 'navigation', 'behaviour', 'window'],
},
{
id: 'zT9pGm8DF',
id: 'ybU8RLXgm',
label: i18n.ts._deck.alwaysShowMainColumn,
keywords: ['always', 'show', 'main', 'column'],
},
{
id: '5dk2xv1vc',
id: 'xRasZyAVl',
label: i18n.ts._deck.columnAlign,
keywords: ['column', 'align'],
},
{
id: 'gtdEA4FTa',
id: '6qcyPd0oJ',
label: i18n.ts._deck.deckMenuPosition,
keywords: ['menu', 'position'],
},
{
id: 'DHVFdPBT6',
id: '4zk2Now4S',
label: i18n.ts._deck.navbarPosition,
keywords: ['navbar', 'position'],
},
{
id: '3UQ8rUssZ',
id: 'CGNtJ2I3n',
label: i18n.ts._deck.columnGap,
keywords: ['column', 'gap', 'margin'],
},
{
id: 'rxPDMo7bE',
label: i18n.ts.setWallpaper,
keywords: ['wallpaper'],
},
],
label: i18n.ts.deck,
keywords: ['deck', 'ui'],

View file

@ -9,9 +9,9 @@ import type { toHiragana as toHiraganaType } from 'wanakana';
let toHiragana: typeof toHiraganaType = (str?: string) => str ?? '';
let isWanakanaLoaded = false;
/**
/**
* lazy-loading
*
*
* 使
*/
export async function initIntlString(forceWanakana = false) {
@ -82,16 +82,17 @@ export function normalizeStringWithHiragana(str: string) {
/** aとbが同じかどうか */
export function compareStringEquals(a: string, b: string) {
return (
normalizeString(a) === normalizeString(b) ||
normalizeStringWithHiragana(a) === normalizeStringWithHiragana(b)
);
if (a === b) return true; // まったく同じ場合はtrue。なお、ーマライズ前後で文字数が変化することがあるため、文字数が違うからといってfalseにはできない
if (normalizeString(a) === normalizeString(b)) return true;
if (normalizeStringWithHiragana(a) === normalizeStringWithHiragana(b)) return true;
return false;
}
/** baseにqueryが含まれているかどうか */
export function compareStringIncludes(base: string, query: string) {
return (
normalizeString(base).includes(normalizeString(query)) ||
normalizeStringWithHiragana(base).includes(normalizeStringWithHiragana(query))
);
if (base === query) return true; // まったく同じ場合は含まれていると考えてよいのでtrue
if (base.includes(query)) return true;
if (normalizeString(base).includes(normalizeString(query))) return true;
if (normalizeStringWithHiragana(base).includes(normalizeStringWithHiragana(query))) return true;
return false;
}