Merge pull request #3588 from glitch-soc/glitch-soc/merge-upstream

Merge upstream changes up to 87d99b17cc
This commit is contained in:
Claire authored and GitHub committed 2026-07-20 20:48:47 +02:00
commit 4d4d2ffa6c
68 files changed
+1830 -860

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ group :test do
# Browser integration testing
gem 'capybara', '~> 3.39'
gem 'capybara-playwright-driver'
gem 'playwright-ruby-client', '1.60.0', require: false # Pinning the exact version as it needs to be kept in sync with the installed npm package
gem 'playwright-ruby-client', require: false
# Used to reset the database between system tests
gem 'database_cleaner-active_record'
+9 -8
View File
@@ -99,7 +99,7 @@ GEM
ast (2.4.3)
attr_required (1.0.2)
aws-eventstream (1.4.0)
aws-partitions (1.1269.0)
aws-partitions (1.1270.0)
aws-sdk-core (3.254.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
@@ -111,7 +111,7 @@ GEM
aws-sdk-kms (1.130.0)
aws-sdk-core (~> 3, >= 3.254.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.227.0)
aws-sdk-s3 (1.228.0)
aws-sdk-core (~> 3, >= 3.254.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
@@ -596,7 +596,7 @@ GEM
pg (1.6.3)
pghero (3.8.0)
activerecord (>= 7.2)
playwright-ruby-client (1.60.0)
playwright-ruby-client (1.61.0)
base64
concurrent-ruby (>= 1.1.6)
mime-types (>= 3.0)
@@ -669,8 +669,8 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
rails-html-sanitizer (1.7.1)
loofah (~> 2.25, >= 2.25.2)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-i18n (8.1.0)
i18n (>= 0.7, < 2)
@@ -840,7 +840,7 @@ GEM
simple_form (5.4.1)
actionpack (>= 7.0)
activemodel (>= 7.0)
simplecov (1.0.1)
simplecov (1.0.2)
simplecov-lcov (0.9.0)
ssrf_filter (1.5.0)
stackprof (0.2.28)
@@ -863,7 +863,8 @@ GEM
unicode-display_width (>= 1.1.1, < 4)
terrapin (1.1.1)
climate_control
test-prof (1.6.1)
test-prof (1.6.2)
logger
thor (1.5.0)
tilt (2.8.0)
timeout (0.6.1)
@@ -1041,7 +1042,7 @@ DEPENDENCIES
parslet
pg (~> 1.5)
pghero
playwright-ruby-client (= 1.60.0)
playwright-ruby-client
premailer-rails
prometheus_exporter (~> 2.2)
propshaft
@@ -606,7 +606,7 @@ const fetchComposeSuggestionsTags = throttle((dispatch, token) => {
}, 200, { leading: true, trailing: true });
export function fetchComposeSuggestions(token) {
return (dispatch, getState) => {
return (dispatch) => {
switch (token[0]) {
case ':':
void fetchComposeSuggestionsEmojis(dispatch, token);
@@ -54,7 +54,13 @@ export const ThemePlayground: React.FC = () => {
</button>
</aside>
</nav>
<main>Test 1 2 3</main>
<main>
<h1>Home</h1>
<p>Test 1 2 3</p>
<p>
This is a <strong>bold statement!</strong>
</p>
</main>
<div className={classes.overlay}>Hello World</div>
</div>
);
@@ -1,17 +1,34 @@
@use '@/styles/mastodon/mixins';
.wrapper {
// Override global body font variable because Storybook
// doesn't have the `data-redesign` html attribute
--font-body: Inter, sans-serif;
position: relative;
display: grid;
grid-template-columns: 250px 1fr;
gap: var(--space-md);
padding: var(--space-3xl);
font-family: Inter, sans-serif;
font-size: var(--fs-lg);
line-height: var(--lh-normal);
overflow-wrap: break-word;
color: var(--color-text-primary);
background-color: var(--color-bg-blend);
h1 {
@include mixins.type-heading-lg;
}
p {
@include mixins.type-body;
}
strong {
font-weight: bold;
}
* {
min-width: 0;
}
@@ -10,6 +10,14 @@ describe('textAtCursorMatchesToken', () => {
['#hash tag', 8, ['#']],
[1, '#hash tag'],
],
[
[':+1', 2, [':']],
[1, ':+1'],
],
[
[':-1', 2, [':']],
[1, ':-1'],
],
[
['#ハッシュタグ', 6, ['#']],
[1, '#ハッシュタグ'],
@@ -8,7 +8,7 @@ export const textAtCursorMatchesToken = (
let word: string;
const regex = new RegExp(
`[${searchTokens.join('')}${WORD}]+(\\s[${WORD}]+)?$`,
`[${searchTokens.join('')}${WORD}+-]+(\\s[${WORD}]+)?$`,
'iu',
);
const left = str.slice(0, caretPosition).search(regex);
@@ -5,7 +5,6 @@ import { customEmojiFactory, unicodeEmojiFactory } from '@/testing/factories';
import {
putEmojiData,
search,
loadEmojiByHexcode,
testClear,
testGet,
@@ -15,10 +14,11 @@ import {
} from './database';
function rawEmojiFactory(data: Partial<CompactEmoji> = {}): CompactEmoji {
const factory = unicodeEmojiFactory();
return {
...unicodeEmojiFactory(),
tags: ['test', 'emoji'],
...factory,
...data,
tags: data.tags ?? factory.tokens,
};
}
@@ -32,108 +32,6 @@ describe('emoji database', () => {
indexedDB = new IDBFactory();
});
describe('search', () => {
beforeEach(async () => {
await putEmojiData([], 'en');
});
test('test no query tokens', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await expect(search({ query: ' ', locale: 'en' })).resolves.toEqual([]);
});
test('unicode results', async () => {
await putEmojiData(
[
rawEmojiFactory({
hexcode: 'unicode_hex',
label: 'Party Popper',
shortcodes: ['party_popper'],
unicode: '🎉',
}),
],
'en',
);
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'unicode_hex',
}),
);
});
test('custom results', async () => {
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'party_custom' })],
});
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
shortcode: 'party_custom',
}),
);
});
test('shortcode results', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await putLegacyShortcodes({
test: ['legacy_smile'],
});
await expect(
search({ query: 'legacy', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'test',
}),
);
});
test('full custom emoji search', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'arrow' }),
customEmojiFactory({ shortcode: 'party_parrot' }),
],
});
const result = await search({ query: 'arro', locale: 'en' });
expect(result).toContainEqual(
// Test for ordinary IDB search
expect.objectContaining({
shortcode: 'arrow',
}),
);
expect(result).toContainEqual(
// Test for manual iteration search
expect.objectContaining({
shortcode: 'party_parrot',
}),
);
});
test('limit test', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'limit' }),
customEmojiFactory({ shortcode: 'limit_extra' }),
],
});
await expect(
search({ query: 'limit', locale: 'en', limit: 1 }),
).resolves.toEqual([
expect.objectContaining({
shortcode: 'limit',
}),
]);
});
});
describe('putEmojiData', () => {
test('adds to loaded locales', async () => {
const { loadedLocales } = await testGet();
@@ -9,12 +9,11 @@ import type { Database } from './db-schema';
import { importEmojiData } from './loader';
import { localeToSegmenter, toSupportedLocale } from './locale';
import {
extractTokens,
skinHexcodeToEmoji,
transformCustomEmojiData,
transformEmojiData,
} from './normalize';
import type { AnyEmojiData, CacheKey, CustomEmojiData } from './types';
import type { CacheKey } from './types';
import { emojiLogger } from './utils';
const loadedLocales = new Set<Locale>();
@@ -43,223 +42,22 @@ const loadDB = (() => {
return loadPromise;
})();
type ScoreMap = Map<string, AnyEmojiData & { score: number }>;
export async function search({
query,
locale: localeString,
limit = 0,
}: {
query: string;
locale: string;
limit?: number;
}) {
performance.mark('emoji-search-start');
// Get the locale, and extract tokens from the query.
const locale = await toLoadedLocale(localeString);
const segmenter = localeToSegmenter(locale);
const queryTokens = extractTokens(query, segmenter);
if (queryTokens.length === 0) {
log('no tokens extracted from query "%s"', query);
return [];
}
const lastToken = queryTokens.at(-1);
if (!lastToken) {
throw new Error('Missing tokens from query');
}
log('searching for tokens %o in locale %s', queryTokens, locale);
// Create an array of emoji results
export async function rawSearch(query: string, locale: Locale, prefix = true) {
await toLoadedLocale(locale);
const db = await loadDB();
const resultArrays: ScoreMap[] = [];
const existingCustomShortcodes = new Set<string>();
for (let i = 0; i < queryTokens.length; i++) {
const token = queryTokens[i];
if (!token) continue;
// Only query the range for the last token to allow partial matches.
const range =
i === queryTokens.length - 1
? IDBKeyRange.lowerBound(token)
: IDBKeyRange.only(token);
const [unicodeResults, customResults, shortcodeResults] = await Promise.all(
[
db.getAllFromIndex(locale, 'tokens', range),
db.getAllFromIndex('custom', 'tokens', range),
db.getAllFromIndex('shortcodes', 'shortcodes', range),
],
);
const resultMap: ScoreMap = new Map();
for (const emoji of unicodeResults) {
const score = getScoreForEmoji(emoji, token);
if (score === null) {
continue;
}
resultMap.set(emoji.hexcode, { ...emoji, score });
}
for (const emoji of customResults) {
const score = getScoreForEmoji(emoji, token);
if (score === null) {
continue;
}
existingCustomShortcodes.add(emoji.shortcode);
resultMap.set(emoji.shortcode, { ...emoji, score });
}
for (const shortcodeResult of shortcodeResults) {
if (resultMap.has(shortcodeResult.hexcode)) {
continue;
}
const emoji = await db.get(locale, shortcodeResult.hexcode);
if (!emoji) {
continue;
}
// Score the emoji with the legacy shortcode, even though it's not part of the emoji.
const score = getScoreForEmoji(
{
...emoji,
shortcodes: [...shortcodeResult.shortcodes, ...emoji.shortcodes],
},
token,
);
if (score === null) {
continue;
}
resultMap.set(emoji.hexcode, { ...emoji, score });
}
log('found %d results for token "%s"', resultMap.size, token);
resultArrays.push(resultMap);
}
// Utilize maps to find the intersection of all result sets.
const results = Array.from(
resultArrays
.reduce((prev, curr) => {
const intersection: ScoreMap = new Map();
for (const [code, emoji] of prev) {
if (curr.has(code)) {
intersection.set(code, emoji);
}
}
return intersection;
})
.values(),
);
// If there are no results, try a cursor-based custom emoji search instead.
if (results.length === 0 || results.length < limit) {
const customEmojisFound = await fullCustomSearch(
query,
existingCustomShortcodes,
);
if (customEmojisFound.length > 0) {
log(
'cursor search found %d results for "%s"',
customEmojisFound.length,
query,
);
results.push(...customEmojisFound);
}
}
// Sort by score, descending.
results.sort((a, b) => a.score - b.score);
const time = performance.measure('emoji-search-end', 'emoji-search-start');
log(
'search for "%s" in locale %s returned %d results and took %dms',
query,
locale,
results.length,
time.duration,
);
if (limit > 0) {
return results.slice(0, limit);
}
return results;
}
function getScoreForEmoji(
emoji: AnyEmojiData,
query: string,
checkTokens = true,
) {
const id = 'shortcode' in emoji ? emoji.shortcode : emoji.label;
if (id === query) {
return 0;
}
let index = 1;
const searchTokens = [id];
if (checkTokens) {
// Check shortcodes before tokens as they are more important.
if ('shortcodes' in emoji) {
searchTokens.push(...emoji.shortcodes);
}
searchTokens.push(...emoji.tokens);
}
for (const token of searchTokens) {
const tokenIndex = token.indexOf(query);
if (tokenIndex !== -1) {
return index + tokenIndex / token.length;
}
index++;
}
return null;
}
async function fullCustomSearch(query: string, existing = new Set<string>()) {
const db = await loadDB();
const trx = db.transaction('custom', 'readonly');
const foundEmojis = new Set<string>();
// First iterate over chunks of 1,000 custom emoji keys and find any matches.
const chunkSize = 1_000;
let lastKey: string | null = null;
let keys: string[] = [];
do {
const keyRange = lastKey ? IDBKeyRange.lowerBound(lastKey, true) : null;
keys = await trx.store.getAllKeys(keyRange, chunkSize);
if (keys.length === 0) {
break;
}
log('cursor search got batch of %d emojis', keys.length);
lastKey = keys.at(-1) ?? null;
for (const key of keys) {
if (!foundEmojis.has(key) && !existing.has(key) && key.includes(query)) {
foundEmojis.add(key);
}
}
} while (keys.length === chunkSize);
// Next get the full emojis for all matches.
const emojis = await Promise.all(
foundEmojis.keys().map((key) => trx.store.get(key)),
);
const results: (CustomEmojiData & { score: number })[] = [];
for (const emoji of emojis) {
if (emoji) {
const score = getScoreForEmoji(emoji, query, false);
if (score && score > 0) {
results.push({
score,
...emoji,
});
}
}
}
return results;
const range = prefix
? IDBKeyRange.lowerBound(query)
: IDBKeyRange.only(query);
const [unicodeResults, customResults, shortcodeResults] = await Promise.all([
db.getAllFromIndex(locale, 'tokens', range),
db.getAllFromIndex('custom', 'tokens', range),
db.getAllFromIndex('shortcodes', 'shortcodes', range),
]);
return {
unicodeResults,
customResults,
shortcodeResults,
};
}
export async function putEmojiData(emojis: CompactEmoji[], locale: Locale) {
@@ -369,6 +167,9 @@ export async function loadCustomEmojiByShortcode(shortcode: string) {
}
export async function searchCustomEmojisByShortcodes(shortcodes: string[]) {
if (shortcodes.length === 0) {
return [];
}
const db = await loadDB();
const sortedCodes = shortcodes.toSorted();
const results = await db.getAll(
@@ -378,6 +179,15 @@ export async function searchCustomEmojisByShortcodes(shortcodes: string[]) {
return results.filter((emoji) => shortcodes.includes(emoji.shortcode));
}
export async function loadCustomEmojiKeys(
query?: string | null,
chunkSize = 1_000,
) {
const db = await loadDB();
const keyRange = query ? IDBKeyRange.lowerBound(query, true) : null;
return db.getAllKeys('custom', keyRange, chunkSize);
}
export async function loadAllCustomEmoji() {
const db = await loadDB();
const cacheValue = await db.get('etags', 'custom');
@@ -64,7 +64,7 @@ type Transaction<Mode extends IDBTransactionMode = 'versionchange'> =
export type Database = IDBPDatabase<EmojiDB>;
const DATABASE_NAME = 'mastodon-emoji';
const SCHEMA_VERSION = 4;
const SCHEMA_VERSION = 5;
export async function openEmojiDB() {
try {
@@ -60,7 +60,7 @@ export function transformEmojiData(
...extract(label),
...(normalizedEmoticons ?? []),
]),
].sort((a, b) => a.localeCompare(b));
];
const res: UnicodeEmojiData = {
tokens,
@@ -7,6 +7,7 @@ import {
} from '@/flavours/glitch/store/typed_functions';
import { createLimitedCache } from '@/flavours/glitch/utils/cache';
import { search } from './search';
import { emojiLogger } from './utils';
const log = emojiLogger('picker');
@@ -37,7 +38,6 @@ export async function emojiMartSearch(
return cachedResult;
}
const { search } = await import('./database');
const results = await search({ query, locale, limit });
const legacyResults = results.map((emoji) =>
'shortcode' in emoji
@@ -0,0 +1,188 @@
import type { CompactEmoji } from 'emojibase';
import { unicodeEmojiFactory, customEmojiFactory } from '@/testing/factories';
import {
putEmojiData,
putCustomEmojiData,
putLegacyShortcodes,
testGet,
testClear,
} from './database';
import { search } from './search';
function rawEmojiFactory(data: Partial<CompactEmoji> = {}): CompactEmoji {
const factory = unicodeEmojiFactory();
return {
...factory,
...data,
tags: data.tags ?? factory.tokens,
};
}
describe('search', () => {
beforeEach(async () => {
await testGet(); // Loads the database schema.
await putEmojiData([], 'en');
});
afterEach(() => {
testClear();
indexedDB = new IDBFactory();
});
test('test no query tokens', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await expect(search({ query: ' ', locale: 'en' })).resolves.toEqual([]);
});
test('unicode results', async () => {
await putEmojiData(
[
rawEmojiFactory({
hexcode: 'unicode_hex',
label: 'Party Popper',
shortcodes: ['party_popper'],
unicode: '🎉',
}),
],
'en',
);
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'unicode_hex',
}),
);
});
test('custom results', async () => {
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'party_custom' })],
});
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
shortcode: 'party_custom',
}),
);
});
test('shortcode results', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await putLegacyShortcodes({
test: ['legacy_smile'],
});
await expect(
search({ query: 'legacy', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'test',
}),
);
});
test('full custom emoji search', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'arrow' }),
customEmojiFactory({ shortcode: 'party_parrot' }),
],
});
const result = await search({ query: 'arro', locale: 'en' });
expect(result).toContainEqual(
// Test for ordinary IDB search
expect.objectContaining({
shortcode: 'arrow',
}),
);
expect(result).toContainEqual(
// Test for manual iteration search
expect.objectContaining({
shortcode: 'party_parrot',
}),
);
});
test('limit test', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'limit' }),
customEmojiFactory({ shortcode: 'limit_extra' }),
],
});
await expect(
search({ query: 'limit', locale: 'en', limit: 1 }),
).resolves.toEqual([
expect.objectContaining({
shortcode: 'limit',
}),
]);
});
test('prefix matches', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'sob_other' }),
customEmojiFactory({ shortcode: 'meow_sob' }),
],
});
await putEmojiData(
[
rawEmojiFactory({
label: 'loudly crying face',
hexcode: '1F62D',
shortcodes: ['loudly_crying_face'],
tags: ['bawling', 'cry', 'sad', 'sob', 'tear', 'tears', 'unhappy'],
emoticon: ":'o",
unicode: '😭',
}),
],
'en',
);
const results = await search({ query: 'sob', locale: 'en' });
expect(results).toHaveLength(3);
expect(results).toEqual([
expect.objectContaining({ shortcode: 'sob_other' }),
expect.objectContaining({ shortcode: 'meow_sob' }),
expect.objectContaining({ hexcode: '1F62D' }),
]);
});
test('shortcode matches', async () => {
await putLegacyShortcodes({ '1F62D': 'sob' });
await putEmojiData(
[
rawEmojiFactory({
label: 'loudly crying face',
hexcode: '1F62D',
shortcodes: ['loudly_crying_face'],
tags: ['bawling', 'cry', 'sad', 'sob', 'tear', 'tears', 'unhappy'],
emoticon: ":'o",
unicode: '😭',
}),
],
'en',
);
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'sob_other' })],
});
const results = await search({ query: 'sob', locale: 'en' });
expect(results).toHaveLength(2);
expect(results).toEqual([
expect.objectContaining({ hexcode: '1F62D' }),
expect.objectContaining({ shortcode: 'sob_other' }),
]);
});
});
@@ -0,0 +1,407 @@
import { log } from 'debug';
import type { ArrayValues, KeysOfUnion } from 'type-fest';
import {
loadCustomEmojiKeys,
loadEmojiByHexcode,
rawSearch,
searchCustomEmojisByShortcodes,
} from './database';
import { localeToSegmenter, toSupportedLocale } from './locale';
import { extractTokens } from './normalize';
import type { AnyEmojiData, CustomEmojiData } from './types';
/*
Emoji search logic:
1. When provided a string, extract all tokens and iterate over each.
2. For each token, do an IDB lookup to get any matches on emojis and shortcodes.
3. Score each emoji found (see below).
4. Create a final list of emojis that is the intersection of all token results, with the scores combined.
5. If not enough emoji are found, do a cursor search on custom emojis.
6. Sort and return the emoji by ranked score, stopping when the optional limit is reached.
Scoring functions as follows:
- Go over every scoreRanking field in order and extract score data.
- Scores prefer exact match, then prefix match, and lastly substring match.
- When sorting, prefer identifier fields first, then score, then category, and lastly prioritize Unicode emojis.
*/
const scoreRanking = [
'label',
'shortcode',
'emoticons',
'shortcodes',
'tokens',
] as const satisfies KeysOfUnion<AnyEmojiData>[];
type ScoreRankingKeys = ArrayValues<typeof scoreRanking>;
type ScoreRanking = Record<ScoreRankingKeys, number>;
const identifierFields = new Set<ScoreRankingKeys>([
'label',
'shortcode',
'emoticons',
'shortcodes',
]);
interface BestRank {
categoryWeight: number;
score: number;
fieldWeight: number;
}
type ScoredEmoji = AnyEmojiData & { scores: ScoreRanking };
type RankedEmoji = AnyEmojiData & { rank: BestRank };
type ScoreMap = Map<string, ScoredEmoji>;
export async function search({
query: rawQuery,
locale: localeString,
limit = 0,
}: {
query: string;
locale: string;
limit?: number;
}) {
performance.mark('emoji-search-start');
// Get the locale, and extract tokens from the query.
const locale = toSupportedLocale(localeString);
const segmenter = localeToSegmenter(locale);
const query = rawQuery.toLowerCase();
const queryTokens = extractTokens(query, segmenter);
if (queryTokens.length === 0) {
log('no tokens extracted from query "%s"', query);
return [];
}
const lastToken = queryTokens.at(-1);
if (!lastToken) {
throw new Error('Missing tokens from query');
}
log('searching for tokens %o in locale %s', queryTokens, locale);
// Create an array of emoji results
const resultArrays: ScoreMap[] = [];
for (let i = 0; i < queryTokens.length; i++) {
const token = queryTokens[i];
if (!token) continue;
// Only query the range for the last token to allow partial matches.
const { unicodeResults, customResults, shortcodeResults } = await rawSearch(
token,
locale,
i === queryTokens.length - 1,
);
const resultMap: ScoreMap = new Map();
const checkedSet = new Set<string>();
// Score unicode results.
for (const emoji of unicodeResults) {
if (checkedSet.has(emoji.hexcode)) {
continue;
}
checkedSet.add(emoji.hexcode);
const scores = getScoreForEmoji(emoji, token);
if (scores) {
resultMap.set(emoji.hexcode, { ...emoji, scores });
}
}
// Score custom emojis.
for (const emoji of customResults) {
if (checkedSet.has(emoji.shortcode)) {
continue;
}
checkedSet.add(emoji.shortcode);
const scores = getScoreForEmoji(emoji, token);
if (scores) {
resultMap.set(emoji.shortcode, { ...emoji, scores });
}
}
// Score based on legacy shortcodes, using the higher score if there's a match.
for (const shortcodeResult of shortcodeResults) {
const emoji =
resultMap.get(shortcodeResult.hexcode) ??
(await loadEmojiByHexcode(shortcodeResult.hexcode, locale));
if (!emoji || !('hexcode' in emoji)) {
continue;
}
const newScores = getScoreForEmoji(
{
...emoji,
shortcodes: shortcodeResult.shortcodes,
},
token,
);
if (!newScores) {
continue;
}
const oldScores = resultMap.get(emoji.hexcode)?.scores;
const scores = oldScores
? combineEmojiScores(oldScores, newScores)
: newScores;
resultMap.set(emoji.hexcode, {
...emoji,
shortcodes: [...shortcodeResult.shortcodes, ...emoji.shortcodes],
scores,
});
}
log('found %d results for token "%s"', resultMap.size, token);
resultArrays.push(resultMap);
}
// Iterate over all maps, getting a combined score for emojis that exist in all results.
const allEmojiIds = resultArrays.reduce((prev, map) => {
if (prev.size === 0) {
return new Set(map.keys());
}
return new Set(map.keys()).intersection(prev);
}, new Set<string>());
const finalMap: ScoreMap = new Map();
for (const resultArray of resultArrays) {
for (const [id, emoji] of resultArray.entries()) {
if (!allEmojiIds.has(id)) {
continue;
}
const existingEmoji = finalMap.get(id);
if (!existingEmoji) {
finalMap.set(id, emoji);
} else {
finalMap.set(id, {
...existingEmoji,
scores: combineEmojiScores(existingEmoji.scores, emoji.scores),
});
}
}
}
const mixedResults = Array.from(finalMap.values());
// If there are no results, try a cursor-based custom emoji search instead.
if (mixedResults.length === 0 || mixedResults.length < limit) {
const customEmojisFound = await fullCustomSearch(query, allEmojiIds);
if (customEmojisFound.length > 0) {
log(
'cursor search found %d results for "%s"',
customEmojisFound.length,
query,
);
mixedResults.push(...customEmojisFound);
}
}
const rankedEmojis = mixedResults.map(({ scores, ...emoji }) => ({
...emoji,
rank: getBestRank(scores),
}));
const results: RankedEmoji[] = [];
const resultEmojis = new Set<string>();
for (const result of rankedEmojis.toSorted(compareRankedEmoji)) {
const id = getIdentifier(result);
if (resultEmojis.has(id)) {
continue;
}
results.push(result);
resultEmojis.add(id);
if (limit > 0 && results.length >= limit) {
break;
}
}
const time = performance.measure('emoji-search-end', 'emoji-search-start');
log(
'search for "%s" in locale %s returned %d results and took %dms',
query,
locale,
mixedResults.length,
time.duration,
);
return results;
}
function hasField(
emoji: AnyEmojiData,
field: string,
): field is keyof typeof emoji {
return Object.hasOwn(emoji, field);
}
function getIdentifier(emoji: AnyEmojiData) {
return 'shortcode' in emoji ? emoji.shortcode : emoji.hexcode;
}
// Creates ranked scores for a given emoji.
function getScoreForEmoji(emoji: AnyEmojiData, query: string) {
const scores = Object.fromEntries(
scoreRanking.map((field) => [field, -1]),
) as ScoreRanking;
let hasScore = false;
for (const field of scoreRanking) {
if (hasField(emoji, field)) {
const value = emoji[field] as string | string[] | undefined;
if (value === undefined) {
continue;
}
const tokens = Array.isArray(value) ? value : [value];
const score = getScoreForEmojiTokens(
tokens.map((token) => token.toLowerCase()),
query,
);
if (score >= 0) {
scores[field] = score;
hasScore = true;
}
}
}
if (!hasScore) {
return null;
}
return scores;
}
function combineEmojiScores(a: ScoreRanking, b: ScoreRanking): ScoreRanking {
const scores = Object.fromEntries(
scoreRanking.map((field) => [field, -1]),
) as ScoreRanking;
for (const rank of scoreRanking) {
if (a[rank] === -1) {
scores[rank] = b[rank];
} else if (b[rank] === -1) {
scores[rank] = a[rank];
} else {
scores[rank] = Math.min(a[rank], b[rank]);
}
}
return scores;
}
// Compares two scored emojis by getting the best rank.
function compareRankedEmoji(a: RankedEmoji, b: RankedEmoji): number {
const rankA = a.rank;
const rankB = b.rank;
// Identifier matches always outrank token matches, regardless of score.
if (rankA.categoryWeight !== rankB.categoryWeight) {
return rankA.categoryWeight - rankB.categoryWeight;
}
// Within the same category, compare the scores directly.
if (rankA.score !== rankB.score) {
return rankA.score - rankB.score;
}
// If equal, compare field weights.
if (rankA.fieldWeight !== rankB.fieldWeight) {
return rankA.fieldWeight - rankB.fieldWeight;
}
// Lastly prioritize Unicode emojis.
const aIsCustom = hasField(a, 'shortcode');
const bIsCustom = hasField(b, 'shortcode');
if (aIsCustom !== bIsCustom) {
return aIsCustom ? -1 : 1;
}
return 0;
}
// Extracts the best rank for a score ranking.
function getBestRank(scores: ScoreRanking): BestRank {
let best: BestRank | null = null;
// Use the index to determine field weight.
for (const [fieldWeight, field] of scoreRanking.entries()) {
const score = scores[field];
if (score < 0) {
continue;
}
// Also weight identifier fields over other fields.
const categoryWeight = identifierFields.has(field) ? 0 : 1;
if (
!best ||
categoryWeight < best.categoryWeight ||
(categoryWeight === best.categoryWeight &&
(score < best.score ||
(score === best.score && fieldWeight < best.fieldWeight)))
) {
best = { categoryWeight, score, fieldWeight };
}
}
return (
best ?? {
categoryWeight: 2,
score: Infinity,
fieldWeight: scoreRanking.length,
}
);
}
function getScoreForEmojiTokens(tokens: string[], query: string) {
let lowestScore = -1;
for (const token of tokens) {
let score = -1;
// Priority: exact match, prefix match, substring,
if (token === query) {
score = 0;
} else if (token.startsWith(query)) {
score = 1 + query.length / token.length;
} else if (token.includes(query)) {
score = 2 + query.length / token.length;
} // TODO: Add fuzzy search if needed
if (score >= 0 && (score < lowestScore || lowestScore < 0)) {
lowestScore = score;
}
}
return lowestScore;
}
async function fullCustomSearch(query: string, existing = new Set<string>()) {
const foundEmojis = new Set<string>();
// First iterate over chunks of 1,000 custom emoji keys and find any matches.
const chunkSize = 1_000;
let lastKey: string | null = null;
let keys: string[] = [];
do {
keys = await loadCustomEmojiKeys(lastKey, chunkSize);
if (keys.length === 0) {
break;
}
log('cursor search got batch of %d emojis', keys.length);
lastKey = keys.at(-1) ?? null;
for (const key of keys) {
if (!foundEmojis.has(key) && !existing.has(key) && key.includes(query)) {
foundEmojis.add(key);
}
}
} while (keys.length === chunkSize);
// Next get the full emojis for all matches.
const emojis = await searchCustomEmojisByShortcodes(Array.from(foundEmojis));
const results: (CustomEmojiData & { scores: ScoreRanking })[] = [];
for (const emoji of emojis) {
const scores = getScoreForEmoji(emoji, query);
if (scores) {
results.push({
scores,
...emoji,
});
}
}
return results;
}
@@ -44,7 +44,7 @@ const mapDispatchToProps = (dispatch) => ({
}
} else if (path[0] === 'quickFilter') {
dispatch(changeSetting(['notifications', ...path], checked));
dispatch(setNotificationsFilter('all'));
dispatch(setNotificationsFilter({ filterType: 'all' }));
} else if (path[0] === 'alerts' && checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
@@ -2,6 +2,8 @@
@use 'mastodon/mixins';
@use '@/styles/fonts/roboto';
@use '@/styles/fonts/roboto-mono';
@use '@/styles/fonts/inter';
@use '@/styles/fonts/syne';
@use 'mastodon/reset';
@use 'mastodon/tokens';
@@ -3,7 +3,7 @@
*/
@mixin type-heading-lg {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-3xl);
font-weight: bold;
line-height: var(--lh-tighter);
@@ -11,7 +11,7 @@
}
@mixin type-heading-md {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-2xl);
font-weight: bold;
line-height: var(--lh-tighter);
@@ -19,7 +19,7 @@
}
@mixin type-heading-sm {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-xl);
font-weight: bold;
line-height: var(--lh-tight);
@@ -27,7 +27,7 @@
}
@mixin type-body-lg {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-lg);
font-weight: normal;
line-height: var(--lh-normal);
@@ -35,7 +35,7 @@
}
@mixin type-body-strong {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-md);
font-weight: bold;
line-height: var(--lh-normal);
@@ -43,7 +43,7 @@
}
@mixin type-body {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-md);
font-weight: normal;
line-height: var(--lh-normal);
@@ -51,7 +51,7 @@
}
@mixin type-body-compact {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-sm);
font-weight: normal;
line-height: var(--lh-tight);
@@ -59,7 +59,7 @@
}
@mixin type-label-lg {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-sm);
font-weight: bold;
line-height: var(--lh-tight);
@@ -67,7 +67,7 @@
}
@mixin type-label-md {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -75,7 +75,7 @@
}
@mixin type-label-sm {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-2xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -83,7 +83,7 @@
}
@mixin type-micro {
// font-family: 'JetBrains Mono';
font-family: var(--font-monospace);
font-size: var(--fs-3xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -13,6 +13,3 @@ $no-gap-breakpoint: 1175px;
$mobile-menu-breakpoint: 760px;
$mobile-breakpoint: 630px;
$no-columns-breakpoint: 600px;
$font-sans-serif: 'mastodon-font-sans-serif' !default;
$font-monospace: 'mastodon-font-monospace' !default;
@@ -8,6 +8,14 @@ html {
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
}
--font-body: mastodon-font-sans-serif, sans-serif;
--font-heading: Syne, sans-serif;
--font-monospace: mastodon-font-monospace, monospace;
&[data-redesign='true'] {
--font-body: Inter, sans-serif;
}
--outline-focus-default: 2px solid var(--color-border-brand);
--avatar-border-radius: 8px;
--max-media-height-small: 460px;
@@ -45,7 +53,7 @@ html.has-modal {
}
body {
font-family: $font-sans-serif, sans-serif;
font-family: var(--font-body);
background: var(--color-bg-primary);
font-size: 13px;
line-height: 18px;
@@ -73,7 +81,6 @@ body {
// Fira Sans => Firefox OS
// Droid Sans => Older Androids (<4.0)
// Helvetica Neue => Older macOS <10.11
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
font-family:
system-ui,
-apple-system,
@@ -85,7 +92,6 @@ body {
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
$font-sans-serif,
sans-serif;
}
@@ -1037,7 +1037,7 @@ body > [data-popover-placement] {
.character-counter {
cursor: default;
font-family: $font-sans-serif, sans-serif;
font-family: var(--font-body);
font-size: 14px;
font-weight: 400;
line-height: normal;
@@ -2,7 +2,7 @@
@use 'variables' as *;
code {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
font-weight: 400;
}
@@ -896,7 +896,7 @@ code {
width: 100%;
border: 0;
padding: 10px;
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
background: var(--color-bg-secondary);
color: var(--color-text-primary);
font-size: 14px;
@@ -1147,7 +1147,7 @@ code {
.form_admin_settings_custom_css,
.form_admin_settings_closed_registrations_message {
textarea {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
}
@@ -1172,7 +1172,7 @@ code {
border: 0;
padding: 10px;
font-size: 14px;
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
button {
@@ -168,7 +168,7 @@
}
samp {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
button.table-action-link {
+92
View File
@@ -0,0 +1,92 @@
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION AND CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+93
View File
@@ -0,0 +1,93 @@
Copyright 2017 The Syne Project Authors (https://gitlab.com/bonjour-monde/fonderie/syne-typeface)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
+9
View File
@@ -21,4 +21,13 @@
updateColorScheme();
updateContrast();
const isRedesignEnabled = (
window.localStorage.getItem('experiments')?.split(',') ?? []
).includes('redesign');
if (isRedesignEnabled) {
element.dataset.redesign = true;
}
})(document.documentElement);
+1 -1
View File
@@ -575,7 +575,7 @@ const fetchComposeSuggestionsTags = throttle((dispatch, token) => {
}, 200, { leading: true, trailing: true });
export function fetchComposeSuggestions(token) {
return (dispatch, getState) => {
return (dispatch) => {
switch (token[0]) {
case ':':
void fetchComposeSuggestionsEmojis(dispatch, token);
@@ -54,7 +54,13 @@ export const ThemePlayground: React.FC = () => {
</button>
</aside>
</nav>
<main>Test 1 2 3</main>
<main>
<h1>Home</h1>
<p>Test 1 2 3</p>
<p>
This is a <strong>bold statement!</strong>
</p>
</main>
<div className={classes.overlay}>Hello World</div>
</div>
);
@@ -1,17 +1,34 @@
@use '@/styles/mastodon/mixins';
.wrapper {
// Override global body font variable because Storybook
// doesn't have the `data-redesign` html attribute
--font-body: Inter, sans-serif;
position: relative;
display: grid;
grid-template-columns: 250px 1fr;
gap: var(--space-md);
padding: var(--space-3xl);
font-family: Inter, sans-serif;
font-size: var(--fs-lg);
line-height: var(--lh-normal);
overflow-wrap: break-word;
color: var(--color-text-primary);
background-color: var(--color-bg-blend);
h1 {
@include mixins.type-heading-lg;
}
p {
@include mixins.type-body;
}
strong {
font-weight: bold;
}
* {
min-width: 0;
}
@@ -10,6 +10,14 @@ describe('textAtCursorMatchesToken', () => {
['#hash tag', 8, ['#']],
[1, '#hash tag'],
],
[
[':+1', 2, [':']],
[1, ':+1'],
],
[
[':-1', 2, [':']],
[1, ':-1'],
],
[
['#ハッシュタグ', 6, ['#']],
[1, '#ハッシュタグ'],
@@ -8,7 +8,7 @@ export const textAtCursorMatchesToken = (
let word: string;
const regex = new RegExp(
`[${searchTokens.join('')}${WORD}]+(\\s[${WORD}]+)?$`,
`[${searchTokens.join('')}${WORD}+-]+(\\s[${WORD}]+)?$`,
'iu',
);
const left = str.slice(0, caretPosition).search(regex);
@@ -5,7 +5,6 @@ import { customEmojiFactory, unicodeEmojiFactory } from '@/testing/factories';
import {
putEmojiData,
search,
loadEmojiByHexcode,
testClear,
testGet,
@@ -15,10 +14,11 @@ import {
} from './database';
function rawEmojiFactory(data: Partial<CompactEmoji> = {}): CompactEmoji {
const factory = unicodeEmojiFactory();
return {
...unicodeEmojiFactory(),
tags: ['test', 'emoji'],
...factory,
...data,
tags: data.tags ?? factory.tokens,
};
}
@@ -32,108 +32,6 @@ describe('emoji database', () => {
indexedDB = new IDBFactory();
});
describe('search', () => {
beforeEach(async () => {
await putEmojiData([], 'en');
});
test('test no query tokens', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await expect(search({ query: ' ', locale: 'en' })).resolves.toEqual([]);
});
test('unicode results', async () => {
await putEmojiData(
[
rawEmojiFactory({
hexcode: 'unicode_hex',
label: 'Party Popper',
shortcodes: ['party_popper'],
unicode: '🎉',
}),
],
'en',
);
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'unicode_hex',
}),
);
});
test('custom results', async () => {
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'party_custom' })],
});
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
shortcode: 'party_custom',
}),
);
});
test('shortcode results', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await putLegacyShortcodes({
test: ['legacy_smile'],
});
await expect(
search({ query: 'legacy', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'test',
}),
);
});
test('full custom emoji search', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'arrow' }),
customEmojiFactory({ shortcode: 'party_parrot' }),
],
});
const result = await search({ query: 'arro', locale: 'en' });
expect(result).toContainEqual(
// Test for ordinary IDB search
expect.objectContaining({
shortcode: 'arrow',
}),
);
expect(result).toContainEqual(
// Test for manual iteration search
expect.objectContaining({
shortcode: 'party_parrot',
}),
);
});
test('limit test', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'limit' }),
customEmojiFactory({ shortcode: 'limit_extra' }),
],
});
await expect(
search({ query: 'limit', locale: 'en', limit: 1 }),
).resolves.toEqual([
expect.objectContaining({
shortcode: 'limit',
}),
]);
});
});
describe('putEmojiData', () => {
test('adds to loaded locales', async () => {
const { loadedLocales } = await testGet();
@@ -9,12 +9,11 @@ import type { Database } from './db-schema';
import { importEmojiData } from './loader';
import { localeToSegmenter, toSupportedLocale } from './locale';
import {
extractTokens,
skinHexcodeToEmoji,
transformCustomEmojiData,
transformEmojiData,
} from './normalize';
import type { AnyEmojiData, CacheKey, CustomEmojiData } from './types';
import type { CacheKey } from './types';
import { emojiLogger } from './utils';
const loadedLocales = new Set<Locale>();
@@ -43,223 +42,22 @@ const loadDB = (() => {
return loadPromise;
})();
type ScoreMap = Map<string, AnyEmojiData & { score: number }>;
export async function search({
query,
locale: localeString,
limit = 0,
}: {
query: string;
locale: string;
limit?: number;
}) {
performance.mark('emoji-search-start');
// Get the locale, and extract tokens from the query.
const locale = await toLoadedLocale(localeString);
const segmenter = localeToSegmenter(locale);
const queryTokens = extractTokens(query, segmenter);
if (queryTokens.length === 0) {
log('no tokens extracted from query "%s"', query);
return [];
}
const lastToken = queryTokens.at(-1);
if (!lastToken) {
throw new Error('Missing tokens from query');
}
log('searching for tokens %o in locale %s', queryTokens, locale);
// Create an array of emoji results
export async function rawSearch(query: string, locale: Locale, prefix = true) {
await toLoadedLocale(locale);
const db = await loadDB();
const resultArrays: ScoreMap[] = [];
const existingCustomShortcodes = new Set<string>();
for (let i = 0; i < queryTokens.length; i++) {
const token = queryTokens[i];
if (!token) continue;
// Only query the range for the last token to allow partial matches.
const range =
i === queryTokens.length - 1
? IDBKeyRange.lowerBound(token)
: IDBKeyRange.only(token);
const [unicodeResults, customResults, shortcodeResults] = await Promise.all(
[
db.getAllFromIndex(locale, 'tokens', range),
db.getAllFromIndex('custom', 'tokens', range),
db.getAllFromIndex('shortcodes', 'shortcodes', range),
],
);
const resultMap: ScoreMap = new Map();
for (const emoji of unicodeResults) {
const score = getScoreForEmoji(emoji, token);
if (score === null) {
continue;
}
resultMap.set(emoji.hexcode, { ...emoji, score });
}
for (const emoji of customResults) {
const score = getScoreForEmoji(emoji, token);
if (score === null) {
continue;
}
existingCustomShortcodes.add(emoji.shortcode);
resultMap.set(emoji.shortcode, { ...emoji, score });
}
for (const shortcodeResult of shortcodeResults) {
if (resultMap.has(shortcodeResult.hexcode)) {
continue;
}
const emoji = await db.get(locale, shortcodeResult.hexcode);
if (!emoji) {
continue;
}
// Score the emoji with the legacy shortcode, even though it's not part of the emoji.
const score = getScoreForEmoji(
{
...emoji,
shortcodes: [...shortcodeResult.shortcodes, ...emoji.shortcodes],
},
token,
);
if (score === null) {
continue;
}
resultMap.set(emoji.hexcode, { ...emoji, score });
}
log('found %d results for token "%s"', resultMap.size, token);
resultArrays.push(resultMap);
}
// Utilize maps to find the intersection of all result sets.
const results = Array.from(
resultArrays
.reduce((prev, curr) => {
const intersection: ScoreMap = new Map();
for (const [code, emoji] of prev) {
if (curr.has(code)) {
intersection.set(code, emoji);
}
}
return intersection;
})
.values(),
);
// If there are no results, try a cursor-based custom emoji search instead.
if (results.length === 0 || results.length < limit) {
const customEmojisFound = await fullCustomSearch(
query,
existingCustomShortcodes,
);
if (customEmojisFound.length > 0) {
log(
'cursor search found %d results for "%s"',
customEmojisFound.length,
query,
);
results.push(...customEmojisFound);
}
}
// Sort by score, descending.
results.sort((a, b) => a.score - b.score);
const time = performance.measure('emoji-search-end', 'emoji-search-start');
log(
'search for "%s" in locale %s returned %d results and took %dms',
query,
locale,
results.length,
time.duration,
);
if (limit > 0) {
return results.slice(0, limit);
}
return results;
}
function getScoreForEmoji(
emoji: AnyEmojiData,
query: string,
checkTokens = true,
) {
const id = 'shortcode' in emoji ? emoji.shortcode : emoji.label;
if (id === query) {
return 0;
}
let index = 1;
const searchTokens = [id];
if (checkTokens) {
// Check shortcodes before tokens as they are more important.
if ('shortcodes' in emoji) {
searchTokens.push(...emoji.shortcodes);
}
searchTokens.push(...emoji.tokens);
}
for (const token of searchTokens) {
const tokenIndex = token.indexOf(query);
if (tokenIndex !== -1) {
return index + tokenIndex / token.length;
}
index++;
}
return null;
}
async function fullCustomSearch(query: string, existing = new Set<string>()) {
const db = await loadDB();
const trx = db.transaction('custom', 'readonly');
const foundEmojis = new Set<string>();
// First iterate over chunks of 1,000 custom emoji keys and find any matches.
const chunkSize = 1_000;
let lastKey: string | null = null;
let keys: string[] = [];
do {
const keyRange = lastKey ? IDBKeyRange.lowerBound(lastKey, true) : null;
keys = await trx.store.getAllKeys(keyRange, chunkSize);
if (keys.length === 0) {
break;
}
log('cursor search got batch of %d emojis', keys.length);
lastKey = keys.at(-1) ?? null;
for (const key of keys) {
if (!foundEmojis.has(key) && !existing.has(key) && key.includes(query)) {
foundEmojis.add(key);
}
}
} while (keys.length === chunkSize);
// Next get the full emojis for all matches.
const emojis = await Promise.all(
foundEmojis.keys().map((key) => trx.store.get(key)),
);
const results: (CustomEmojiData & { score: number })[] = [];
for (const emoji of emojis) {
if (emoji) {
const score = getScoreForEmoji(emoji, query, false);
if (score && score > 0) {
results.push({
score,
...emoji,
});
}
}
}
return results;
const range = prefix
? IDBKeyRange.lowerBound(query)
: IDBKeyRange.only(query);
const [unicodeResults, customResults, shortcodeResults] = await Promise.all([
db.getAllFromIndex(locale, 'tokens', range),
db.getAllFromIndex('custom', 'tokens', range),
db.getAllFromIndex('shortcodes', 'shortcodes', range),
]);
return {
unicodeResults,
customResults,
shortcodeResults,
};
}
export async function putEmojiData(emojis: CompactEmoji[], locale: Locale) {
@@ -369,6 +167,9 @@ export async function loadCustomEmojiByShortcode(shortcode: string) {
}
export async function searchCustomEmojisByShortcodes(shortcodes: string[]) {
if (shortcodes.length === 0) {
return [];
}
const db = await loadDB();
const sortedCodes = shortcodes.toSorted();
const results = await db.getAll(
@@ -378,6 +179,15 @@ export async function searchCustomEmojisByShortcodes(shortcodes: string[]) {
return results.filter((emoji) => shortcodes.includes(emoji.shortcode));
}
export async function loadCustomEmojiKeys(
query?: string | null,
chunkSize = 1_000,
) {
const db = await loadDB();
const keyRange = query ? IDBKeyRange.lowerBound(query, true) : null;
return db.getAllKeys('custom', keyRange, chunkSize);
}
export async function loadAllCustomEmoji() {
const db = await loadDB();
const cacheValue = await db.get('etags', 'custom');
@@ -64,7 +64,7 @@ type Transaction<Mode extends IDBTransactionMode = 'versionchange'> =
export type Database = IDBPDatabase<EmojiDB>;
const DATABASE_NAME = 'mastodon-emoji';
const SCHEMA_VERSION = 4;
const SCHEMA_VERSION = 5;
export async function openEmojiDB() {
try {
@@ -60,7 +60,7 @@ export function transformEmojiData(
...extract(label),
...(normalizedEmoticons ?? []),
]),
].sort((a, b) => a.localeCompare(b));
];
const res: UnicodeEmojiData = {
tokens,
@@ -7,6 +7,7 @@ import {
} from '@/mastodon/store/typed_functions';
import { createLimitedCache } from '@/mastodon/utils/cache';
import { search } from './search';
import { emojiLogger } from './utils';
const log = emojiLogger('picker');
@@ -37,7 +38,6 @@ export async function emojiMartSearch(
return cachedResult;
}
const { search } = await import('./database');
const results = await search({ query, locale, limit });
const legacyResults = results.map((emoji) =>
'shortcode' in emoji
@@ -0,0 +1,188 @@
import type { CompactEmoji } from 'emojibase';
import { unicodeEmojiFactory, customEmojiFactory } from '@/testing/factories';
import {
putEmojiData,
putCustomEmojiData,
putLegacyShortcodes,
testGet,
testClear,
} from './database';
import { search } from './search';
function rawEmojiFactory(data: Partial<CompactEmoji> = {}): CompactEmoji {
const factory = unicodeEmojiFactory();
return {
...factory,
...data,
tags: data.tags ?? factory.tokens,
};
}
describe('search', () => {
beforeEach(async () => {
await testGet(); // Loads the database schema.
await putEmojiData([], 'en');
});
afterEach(() => {
testClear();
indexedDB = new IDBFactory();
});
test('test no query tokens', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await expect(search({ query: ' ', locale: 'en' })).resolves.toEqual([]);
});
test('unicode results', async () => {
await putEmojiData(
[
rawEmojiFactory({
hexcode: 'unicode_hex',
label: 'Party Popper',
shortcodes: ['party_popper'],
unicode: '🎉',
}),
],
'en',
);
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'unicode_hex',
}),
);
});
test('custom results', async () => {
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'party_custom' })],
});
await expect(
search({ query: 'party', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
shortcode: 'party_custom',
}),
);
});
test('shortcode results', async () => {
await putEmojiData([rawEmojiFactory()], 'en');
await putLegacyShortcodes({
test: ['legacy_smile'],
});
await expect(
search({ query: 'legacy', locale: 'en' }),
).resolves.toContainEqual(
expect.objectContaining({
hexcode: 'test',
}),
);
});
test('full custom emoji search', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'arrow' }),
customEmojiFactory({ shortcode: 'party_parrot' }),
],
});
const result = await search({ query: 'arro', locale: 'en' });
expect(result).toContainEqual(
// Test for ordinary IDB search
expect.objectContaining({
shortcode: 'arrow',
}),
);
expect(result).toContainEqual(
// Test for manual iteration search
expect.objectContaining({
shortcode: 'party_parrot',
}),
);
});
test('limit test', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'limit' }),
customEmojiFactory({ shortcode: 'limit_extra' }),
],
});
await expect(
search({ query: 'limit', locale: 'en', limit: 1 }),
).resolves.toEqual([
expect.objectContaining({
shortcode: 'limit',
}),
]);
});
test('prefix matches', async () => {
await putCustomEmojiData({
emojis: [
customEmojiFactory({ shortcode: 'sob_other' }),
customEmojiFactory({ shortcode: 'meow_sob' }),
],
});
await putEmojiData(
[
rawEmojiFactory({
label: 'loudly crying face',
hexcode: '1F62D',
shortcodes: ['loudly_crying_face'],
tags: ['bawling', 'cry', 'sad', 'sob', 'tear', 'tears', 'unhappy'],
emoticon: ":'o",
unicode: '😭',
}),
],
'en',
);
const results = await search({ query: 'sob', locale: 'en' });
expect(results).toHaveLength(3);
expect(results).toEqual([
expect.objectContaining({ shortcode: 'sob_other' }),
expect.objectContaining({ shortcode: 'meow_sob' }),
expect.objectContaining({ hexcode: '1F62D' }),
]);
});
test('shortcode matches', async () => {
await putLegacyShortcodes({ '1F62D': 'sob' });
await putEmojiData(
[
rawEmojiFactory({
label: 'loudly crying face',
hexcode: '1F62D',
shortcodes: ['loudly_crying_face'],
tags: ['bawling', 'cry', 'sad', 'sob', 'tear', 'tears', 'unhappy'],
emoticon: ":'o",
unicode: '😭',
}),
],
'en',
);
await putCustomEmojiData({
emojis: [customEmojiFactory({ shortcode: 'sob_other' })],
});
const results = await search({ query: 'sob', locale: 'en' });
expect(results).toHaveLength(2);
expect(results).toEqual([
expect.objectContaining({ hexcode: '1F62D' }),
expect.objectContaining({ shortcode: 'sob_other' }),
]);
});
});
@@ -0,0 +1,407 @@
import { log } from 'debug';
import type { ArrayValues, KeysOfUnion } from 'type-fest';
import {
loadCustomEmojiKeys,
loadEmojiByHexcode,
rawSearch,
searchCustomEmojisByShortcodes,
} from './database';
import { localeToSegmenter, toSupportedLocale } from './locale';
import { extractTokens } from './normalize';
import type { AnyEmojiData, CustomEmojiData } from './types';
/*
Emoji search logic:
1. When provided a string, extract all tokens and iterate over each.
2. For each token, do an IDB lookup to get any matches on emojis and shortcodes.
3. Score each emoji found (see below).
4. Create a final list of emojis that is the intersection of all token results, with the scores combined.
5. If not enough emoji are found, do a cursor search on custom emojis.
6. Sort and return the emoji by ranked score, stopping when the optional limit is reached.
Scoring functions as follows:
- Go over every scoreRanking field in order and extract score data.
- Scores prefer exact match, then prefix match, and lastly substring match.
- When sorting, prefer identifier fields first, then score, then category, and lastly prioritize Unicode emojis.
*/
const scoreRanking = [
'label',
'shortcode',
'emoticons',
'shortcodes',
'tokens',
] as const satisfies KeysOfUnion<AnyEmojiData>[];
type ScoreRankingKeys = ArrayValues<typeof scoreRanking>;
type ScoreRanking = Record<ScoreRankingKeys, number>;
const identifierFields = new Set<ScoreRankingKeys>([
'label',
'shortcode',
'emoticons',
'shortcodes',
]);
interface BestRank {
categoryWeight: number;
score: number;
fieldWeight: number;
}
type ScoredEmoji = AnyEmojiData & { scores: ScoreRanking };
type RankedEmoji = AnyEmojiData & { rank: BestRank };
type ScoreMap = Map<string, ScoredEmoji>;
export async function search({
query: rawQuery,
locale: localeString,
limit = 0,
}: {
query: string;
locale: string;
limit?: number;
}) {
performance.mark('emoji-search-start');
// Get the locale, and extract tokens from the query.
const locale = toSupportedLocale(localeString);
const segmenter = localeToSegmenter(locale);
const query = rawQuery.toLowerCase();
const queryTokens = extractTokens(query, segmenter);
if (queryTokens.length === 0) {
log('no tokens extracted from query "%s"', query);
return [];
}
const lastToken = queryTokens.at(-1);
if (!lastToken) {
throw new Error('Missing tokens from query');
}
log('searching for tokens %o in locale %s', queryTokens, locale);
// Create an array of emoji results
const resultArrays: ScoreMap[] = [];
for (let i = 0; i < queryTokens.length; i++) {
const token = queryTokens[i];
if (!token) continue;
// Only query the range for the last token to allow partial matches.
const { unicodeResults, customResults, shortcodeResults } = await rawSearch(
token,
locale,
i === queryTokens.length - 1,
);
const resultMap: ScoreMap = new Map();
const checkedSet = new Set<string>();
// Score unicode results.
for (const emoji of unicodeResults) {
if (checkedSet.has(emoji.hexcode)) {
continue;
}
checkedSet.add(emoji.hexcode);
const scores = getScoreForEmoji(emoji, token);
if (scores) {
resultMap.set(emoji.hexcode, { ...emoji, scores });
}
}
// Score custom emojis.
for (const emoji of customResults) {
if (checkedSet.has(emoji.shortcode)) {
continue;
}
checkedSet.add(emoji.shortcode);
const scores = getScoreForEmoji(emoji, token);
if (scores) {
resultMap.set(emoji.shortcode, { ...emoji, scores });
}
}
// Score based on legacy shortcodes, using the higher score if there's a match.
for (const shortcodeResult of shortcodeResults) {
const emoji =
resultMap.get(shortcodeResult.hexcode) ??
(await loadEmojiByHexcode(shortcodeResult.hexcode, locale));
if (!emoji || !('hexcode' in emoji)) {
continue;
}
const newScores = getScoreForEmoji(
{
...emoji,
shortcodes: shortcodeResult.shortcodes,
},
token,
);
if (!newScores) {
continue;
}
const oldScores = resultMap.get(emoji.hexcode)?.scores;
const scores = oldScores
? combineEmojiScores(oldScores, newScores)
: newScores;
resultMap.set(emoji.hexcode, {
...emoji,
shortcodes: [...shortcodeResult.shortcodes, ...emoji.shortcodes],
scores,
});
}
log('found %d results for token "%s"', resultMap.size, token);
resultArrays.push(resultMap);
}
// Iterate over all maps, getting a combined score for emojis that exist in all results.
const allEmojiIds = resultArrays.reduce((prev, map) => {
if (prev.size === 0) {
return new Set(map.keys());
}
return new Set(map.keys()).intersection(prev);
}, new Set<string>());
const finalMap: ScoreMap = new Map();
for (const resultArray of resultArrays) {
for (const [id, emoji] of resultArray.entries()) {
if (!allEmojiIds.has(id)) {
continue;
}
const existingEmoji = finalMap.get(id);
if (!existingEmoji) {
finalMap.set(id, emoji);
} else {
finalMap.set(id, {
...existingEmoji,
scores: combineEmojiScores(existingEmoji.scores, emoji.scores),
});
}
}
}
const mixedResults = Array.from(finalMap.values());
// If there are no results, try a cursor-based custom emoji search instead.
if (mixedResults.length === 0 || mixedResults.length < limit) {
const customEmojisFound = await fullCustomSearch(query, allEmojiIds);
if (customEmojisFound.length > 0) {
log(
'cursor search found %d results for "%s"',
customEmojisFound.length,
query,
);
mixedResults.push(...customEmojisFound);
}
}
const rankedEmojis = mixedResults.map(({ scores, ...emoji }) => ({
...emoji,
rank: getBestRank(scores),
}));
const results: RankedEmoji[] = [];
const resultEmojis = new Set<string>();
for (const result of rankedEmojis.toSorted(compareRankedEmoji)) {
const id = getIdentifier(result);
if (resultEmojis.has(id)) {
continue;
}
results.push(result);
resultEmojis.add(id);
if (limit > 0 && results.length >= limit) {
break;
}
}
const time = performance.measure('emoji-search-end', 'emoji-search-start');
log(
'search for "%s" in locale %s returned %d results and took %dms',
query,
locale,
mixedResults.length,
time.duration,
);
return results;
}
function hasField(
emoji: AnyEmojiData,
field: string,
): field is keyof typeof emoji {
return Object.hasOwn(emoji, field);
}
function getIdentifier(emoji: AnyEmojiData) {
return 'shortcode' in emoji ? emoji.shortcode : emoji.hexcode;
}
// Creates ranked scores for a given emoji.
function getScoreForEmoji(emoji: AnyEmojiData, query: string) {
const scores = Object.fromEntries(
scoreRanking.map((field) => [field, -1]),
) as ScoreRanking;
let hasScore = false;
for (const field of scoreRanking) {
if (hasField(emoji, field)) {
const value = emoji[field] as string | string[] | undefined;
if (value === undefined) {
continue;
}
const tokens = Array.isArray(value) ? value : [value];
const score = getScoreForEmojiTokens(
tokens.map((token) => token.toLowerCase()),
query,
);
if (score >= 0) {
scores[field] = score;
hasScore = true;
}
}
}
if (!hasScore) {
return null;
}
return scores;
}
function combineEmojiScores(a: ScoreRanking, b: ScoreRanking): ScoreRanking {
const scores = Object.fromEntries(
scoreRanking.map((field) => [field, -1]),
) as ScoreRanking;
for (const rank of scoreRanking) {
if (a[rank] === -1) {
scores[rank] = b[rank];
} else if (b[rank] === -1) {
scores[rank] = a[rank];
} else {
scores[rank] = Math.min(a[rank], b[rank]);
}
}
return scores;
}
// Compares two scored emojis by getting the best rank.
function compareRankedEmoji(a: RankedEmoji, b: RankedEmoji): number {
const rankA = a.rank;
const rankB = b.rank;
// Identifier matches always outrank token matches, regardless of score.
if (rankA.categoryWeight !== rankB.categoryWeight) {
return rankA.categoryWeight - rankB.categoryWeight;
}
// Within the same category, compare the scores directly.
if (rankA.score !== rankB.score) {
return rankA.score - rankB.score;
}
// If equal, compare field weights.
if (rankA.fieldWeight !== rankB.fieldWeight) {
return rankA.fieldWeight - rankB.fieldWeight;
}
// Lastly prioritize Unicode emojis.
const aIsCustom = hasField(a, 'shortcode');
const bIsCustom = hasField(b, 'shortcode');
if (aIsCustom !== bIsCustom) {
return aIsCustom ? -1 : 1;
}
return 0;
}
// Extracts the best rank for a score ranking.
function getBestRank(scores: ScoreRanking): BestRank {
let best: BestRank | null = null;
// Use the index to determine field weight.
for (const [fieldWeight, field] of scoreRanking.entries()) {
const score = scores[field];
if (score < 0) {
continue;
}
// Also weight identifier fields over other fields.
const categoryWeight = identifierFields.has(field) ? 0 : 1;
if (
!best ||
categoryWeight < best.categoryWeight ||
(categoryWeight === best.categoryWeight &&
(score < best.score ||
(score === best.score && fieldWeight < best.fieldWeight)))
) {
best = { categoryWeight, score, fieldWeight };
}
}
return (
best ?? {
categoryWeight: 2,
score: Infinity,
fieldWeight: scoreRanking.length,
}
);
}
function getScoreForEmojiTokens(tokens: string[], query: string) {
let lowestScore = -1;
for (const token of tokens) {
let score = -1;
// Priority: exact match, prefix match, substring,
if (token === query) {
score = 0;
} else if (token.startsWith(query)) {
score = 1 + query.length / token.length;
} else if (token.includes(query)) {
score = 2 + query.length / token.length;
} // TODO: Add fuzzy search if needed
if (score >= 0 && (score < lowestScore || lowestScore < 0)) {
lowestScore = score;
}
}
return lowestScore;
}
async function fullCustomSearch(query: string, existing = new Set<string>()) {
const foundEmojis = new Set<string>();
// First iterate over chunks of 1,000 custom emoji keys and find any matches.
const chunkSize = 1_000;
let lastKey: string | null = null;
let keys: string[] = [];
do {
keys = await loadCustomEmojiKeys(lastKey, chunkSize);
if (keys.length === 0) {
break;
}
log('cursor search got batch of %d emojis', keys.length);
lastKey = keys.at(-1) ?? null;
for (const key of keys) {
if (!foundEmojis.has(key) && !existing.has(key) && key.includes(query)) {
foundEmojis.add(key);
}
}
} while (keys.length === chunkSize);
// Next get the full emojis for all matches.
const emojis = await searchCustomEmojisByShortcodes(Array.from(foundEmojis));
const results: (CustomEmojiData & { scores: ScoreRanking })[] = [];
for (const emoji of emojis) {
const scores = getScoreForEmoji(emoji, query);
if (scores) {
results.push({
scores,
...emoji,
});
}
}
return results;
}
@@ -44,7 +44,7 @@ const mapDispatchToProps = (dispatch) => ({
}
} else if (path[0] === 'quickFilter') {
dispatch(changeSetting(['notifications', ...path], checked));
dispatch(setNotificationsFilter('all'));
dispatch(setNotificationsFilter({ filterType: 'all' }));
} else if (path[0] === 'alerts' && checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
+7
View File
@@ -174,6 +174,13 @@
"account_edit.field_edit_modal.discard_message": "Saxlanılmamış dəyişiklikləriniz var. Onları silmək istədiyinizə əminsiniz?",
"account_edit.field_edit_modal.edit_title": "Özəl xanaya düzəliş",
"account_edit.field_edit_modal.length_warning": "Tövsiyə edilən xarakter limiti aşıldı. Mobil istifadəçilər xananızın tamamını görməyə bilər.",
"account_edit.image_alt_modal.add_title": "Alternativ mətn əlavə et",
"account_edit.image_alt_modal.details_title": "İpucu: Profil fotoları üçün alternativ mətnlər",
"account_edit.image_alt_modal.edit_title": "Alter. mətnə düzəliş",
"account_edit.image_alt_modal.text_hint": "Alternativ mətnlər, ekran oxuyucu istifadə edən istifadəçilərin məzmununuzu anlamasına kömək edir.",
"account_edit.image_alt_modal.text_label": "Alter. mətn",
"account_edit.image_edit.alt_add_button": "Alter. mətn əlavə et",
"account_edit.image_edit.alt_edit_button": "Alter. mətnə düzəliş",
"account_edit.profile_tab.title": "Profil nümayişi ayarları",
"admin.dashboard.daily_retention": "Qeydiyyatdan sonrakı günə görə istifadəçi qalma dərəcəsi",
"admin.dashboard.monthly_retention": "Qeydiyyatdan sonrakı aya görə istifadəçi qalma dərəcəsi",
+5
View File
@@ -422,8 +422,10 @@
"collections.search_accounts_max_reached": "بیشینهٔ تعداد حساب‌ها را افزوده‌اید",
"collections.sensitive": "حسّاس",
"collections.share_short": "هم‌رسانی",
"collections.sort_alphabetical": "الفبایی",
"collections.sort_by": "",
"collections.sort_date_added": "",
"collections.sort_last_active": "آخرین فعالیت",
"collections.suggestions.can_not_add": "نمی‌توان افزود",
"collections.suggestions.can_not_add_desc": "ممکن است این حساب‌ها از کشف خارج شده باشند یا روی کارسازی باشند که از مجموعه‌ها پشتیبانی نمی‌کند.",
"collections.suggestions.must_follow": "نخست باید پی بگیرید",
@@ -575,6 +577,9 @@
"copy_icon_button.copy_this_text": "رونوشت از پیوند در تخته‌گیره",
"copypaste.copied": "رونوشت شد",
"copypaste.copy_to_clipboard": "رونوشت به تخته‌گیره",
"custom_homepage.about": "درباره",
"custom_homepage.about_this_server": "دربارهٔ این کارساز",
"custom_homepage.contact": "تماس:",
"directory.federated": "از کارسازهای شناخته‌شده",
"directory.local": "تنها از {domain}",
"directory.new_arrivals": "تازه‌واردان",
+11
View File
@@ -148,6 +148,17 @@
"account.unmute": "@{name}さんのミュートを解除",
"account.unmute_notifications_short": "通知オフを解除",
"account.unmute_short": "ミュート解除",
"account_edit.advanced_settings.bot_hint": "このアカウントは主に自動的に動作していて監視されていない可能性があることを、他の人に示します",
"account_edit.advanced_settings.bot_label": "自動アカウント",
"account_edit.advanced_settings.title": "詳細設定",
"account_edit.bio.add_label": "自己紹介を追加",
"account_edit.bio.edit_label": "自己紹介を編集",
"account_edit.bio.placeholder": "他の人があなたを認識できるよう簡単な自己紹介を追加しましょう。",
"account_edit.bio.title": "自己紹介",
"account_edit.bio_modal.add_title": "自己紹介を追加",
"account_edit.bio_modal.edit_title": "自己紹介を編集",
"account_edit.column_button": "完了",
"account_edit.column_title": "プロフィールを編集",
"admin.dashboard.daily_retention": "サインアップ後の日ごとのユーザー継続率",
"admin.dashboard.monthly_retention": "サインアップ後の月ごとのユーザー継続率",
"admin.dashboard.retention.average": "平均",
+63 -51
View File
@@ -31,11 +31,11 @@
"account.cancel_follow_request": "Nie obserwuj",
"account.copy": "Skopiuj link do profilu",
"account.direct": "Napisz bezpośrednio do @{name}",
"account.disable_notifications": "Przestań powiadamiać mnie o wpisach @{name}",
"account.disable_notifications": "Przestań powiadamiać mnie o postach użytkownika @{name}",
"account.edit_note": "Edytuj notatkę osobistą",
"account.edit_profile": "Edytuj profil",
"account.edit_profile_short": "Edytuj",
"account.enable_notifications": "Powiadamiaj mnie o wpisach @{name}",
"account.enable_notifications": "Powiadamiaj mnie o postach użytkownika @{name}",
"account.endorse": "Wyróżnij na profilu",
"account.familiar_followers_many": "To konto jest obserwowane przez {name1}, {name2} i {othersCount, plural, one {jedną inną znaną ci osobę} few {# inne znane ci osoby} many {# innych znanych ci osób} other {# innych znanych ci osób}}",
"account.familiar_followers_one": "Konto jest obserwowane przez: {name1}",
@@ -112,8 +112,8 @@
"account.muted": "Wyciszony",
"account.mutual": "Obserwujecie się wzajemnie",
"account.name.copy": "Kopiuj odnośnik",
"account.name.help.domain": "{domain} to serwer, na którym znajduje się profil i wpisy tego użytkownika.",
"account.name.help.domain_self": "{domain} to Twój serwer, na którym znajduje się Twój profil i wpisy.",
"account.name.help.domain": "{domain} to serwer, na którym znajduje się profil i posty tego użytkownika.",
"account.name.help.domain_self": "{domain} to Twój serwer, na którym znajduje się Twój profil i posty.",
"account.name.help.footer": "Tak samo jak możesz wysyłać e-maile do osób korzystających z różnych dostawców poczty, możesz wchodzić w interakcje z osobami na innych serwerach Mastodona oraz z każdym, kto korzysta z innych aplikacji Fediwersum.",
"account.name.help.header": "Identyfikator jest jak adres e-mail",
"account.name.help.username": "{username} to nazwa użytkownika tego konta na jego serwerze. Ktoś na innym serwerze może mieć taką samą nazwę użytkownika.",
@@ -130,13 +130,13 @@
"account.note.title": "Notatka osobista (widoczna tylko dla Ciebie)",
"account.open_original_page": "Otwórz stronę oryginalną",
"account.pending": "Oczekuje",
"account.posts": "Wpisy",
"account.posts": "Posty",
"account.remove_from_followers": "Usuń {name} z obserwujących",
"account.report": "Zgłoś @{name}",
"account.requested_follow": "{name} chce cię obserwować",
"account.share": "Udostępnij profil @{name}",
"account.show_reblogs": "Pokazuj podbicia od @{name}",
"account.statuses_counter": "{count, plural, one {{counter} wpis} few {{counter} wpisy} many {{counter} wpisów} other {{counter} wpisów}}",
"account.statuses_counter": "{count, plural, one {{counter} post} few {{counter} posty} many {{counter} postów} other {{counter} postów}}",
"account.timeline.pinned": "Przypięte",
"account.timeline.pinned.view_all": "Zobacz wszystkie przypięte posty",
"account.unblock": "Odblokuj @{name}",
@@ -212,9 +212,9 @@
"account_edit.profile_tab.hint.title": "Wyświetlanie może się różnić",
"account_edit.profile_tab.show_featured.description": "\"Wyróżnione\" to opcjonalna zakładka, na której możesz wyświetlać inne konta.",
"account_edit.profile_tab.show_featured.title": "Pokaż zakładkę \"Wyróżnione\"",
"account_edit.profile_tab.show_media.description": "\"Multimedia\" jest opcjonalną zakładką, która wyświetla Twoje wpisy zawierające zdjęcia lub filmy.",
"account_edit.profile_tab.show_media.description": "\"Multimedia\" jest opcjonalną zakładką, która wyświetla Twoje posty zawierające zdjęcia lub wideo.",
"account_edit.profile_tab.show_media.title": "Pokaż zakładkę \"Multimedia\"",
"account_edit.profile_tab.show_media_replies.description": "Po włączeniu zakładka Multimedia pokazuje zarówno Twoje wpisy, jak i odpowiedzi na wpisy innych osób.",
"account_edit.profile_tab.show_media_replies.description": "Po włączeniu zakładka Multimedia pokazuje zarówno Twoje posty, jak i odpowiedzi na posty innych osób.",
"account_edit.profile_tab.show_media_replies.title": "Uwzględniaj odpowiedzi w zakładce \"Multimedia\"",
"account_edit.profile_tab.show_relations.description": "Pokazuje innym użytkownikom konta, które obserwujesz oraz Twoich obserwujących w Twoim profilu. Inni użytkownicy nadal będą mogli zobaczyć, czy ich obserwujesz.",
"account_edit.profile_tab.show_relations.title": "Pokaż \"Obserwujących\" i \"Obserwowanych\"",
@@ -303,7 +303,7 @@
"annual_report.summary.highlighted_post.title": "Najpopularniejszy post",
"annual_report.summary.most_used_app.most_used_app": "najczęściej używana aplikacja",
"annual_report.summary.most_used_hashtag.most_used_hashtag": "najczęściej używany hashtag",
"annual_report.summary.new_posts.new_posts": "nowe wpisy",
"annual_report.summary.new_posts.new_posts": "nowe posty",
"annual_report.summary.percentile.text": "<topLabel>To plasuje cię w czołówce</topLabel><percentage></percentage><bottomLabel> użytkowników {domain}.</bottomLabel>",
"annual_report.summary.percentile.we_wont_tell_bernie": "Nie powiemy Berniemu.",
"annual_report.summary.share_elsewhere": "Udostępnij gdzieindziej",
@@ -312,16 +312,16 @@
"attachments_list.unprocessed": "(nieprzetworzone)",
"audio.hide": "Ukryj dźwięk",
"block_modal.no_collections": "Żadne z Was nie może dodać drugiej osoby do kolekcji. Jeśli takie istnieją, zostaniecie automatycznie usunięci z wzajemnych kolekcji.",
"block_modal.remote_users_caveat": "Poprosimy serwer {domain} o uszanowanie twojej decyzji. Nie jest to jednak gwarantowane, bo niektóre serwery mogą obsługiwać blokady w inny sposób. Publiczne wpisy mogą być nadal widoczne dla niezalogowanych użytkowników.",
"block_modal.remote_users_caveat": "Poprosimy serwer {domain} o uszanowanie Twojej decyzji. Nie jest to jednak gwarantowane, ponieważ niektóre serwery mogą obsługiwać blokowania w inny sposób. Publiczne posty mogą być nadal widoczne dla niezalogowanych użytkowników.",
"block_modal.show_less": "Pokaż mniej",
"block_modal.show_more": "Pokaż więcej",
"block_modal.they_cant_mention": "Nie możecie się nawzajem wspominać, obserwować ani cytować.",
"block_modal.they_cant_see_posts": "Nie zobaczy Twoich treści, a Ty nie zobaczysz jego.",
"block_modal.they_will_know": "Zobaczy informację o blokadzie.",
"block_modal.title": "Zablokować?",
"block_modal.you_wont_see_mentions": "Nie zobaczysz wpisów innych, które wspominają o tym użytkowniku.",
"block_modal.you_wont_see_mentions": "Nie zobaczysz postów od innych, które wspominają o tym użytkowniku.",
"boost_modal.combo": "Możesz kliknąć {combo}, aby pominąć tę czynność następnym razem",
"boost_modal.reblog": "Podbić wpis?",
"boost_modal.reblog": "Podbić post?",
"boost_modal.undo_reblog": "Cofnąć podbicie?",
"bundle_column_error.copy_stacktrace": "Skopiuj raport o błędzie",
"bundle_column_error.error.body": "Nie udało się wyświetlić tej strony. Może to być spowodowane błędem w naszym kodzie lub niezgodnością przeglądarki.",
@@ -456,13 +456,13 @@
"compose.error.blank_post": "Post nie może być pusty.",
"compose.language.change": "Zmień język",
"compose.language.search": "Wyszukaj języki...",
"compose.published.body": "Wpis został opublikowany.",
"compose.published.body": "Post został opublikowany.",
"compose.published.open": "Otwórz",
"compose.saved.body": "Wpis został zapisany.",
"compose.saved.body": "Post został zapisany.",
"compose_form.direct_message_warning_learn_more": "Dowiedz się więcej",
"compose_form.encryption_warning": "Wpisy na Mastodon nie są szyfrowane end-to-end. Nie udostępniaj żadnych poufnych informacji za pośrednictwem Mastodon.",
"compose_form.hashtag_warning": "Ten wpis nie będzie wyświetlany pod żadnym hashtagiem, bo nie jest publiczny. Tylko publiczne wpisy mogą być wyszukiwane po hashtagach.",
"compose_form.lock_disclaimer": "Twoje konto nie jest {locked}. Każdy może cię obserwować, aby zobaczyć twoje wpisy tylko dla obserwujących.",
"compose_form.encryption_warning": "Posty na Mastodonie nie są szyfrowane end-to-end. Nie udostępniaj żadnych poufnych informacji za pośrednictwem Mastodona.",
"compose_form.hashtag_warning": "Ten post nie będzie wyświetlany pod żadnym tagiem, bo nie jest publiczny. Tylko publiczne posty mogą być wyszukiwane po tagach.",
"compose_form.lock_disclaimer": "Twoje konto nie jest {locked}. Wszyscy mogą Cię zaobserwować, aby zobaczyć Twoje posty tylko dla obserwujących.",
"compose_form.lock_disclaimer.lock": "zablokowane",
"compose_form.placeholder": "Co ci chodzi po głowie?",
"compose_form.poll.duration": "Czas trwania ankiety",
@@ -481,8 +481,8 @@
"confirmation_modal.cancel": "Anuluj",
"confirmations.block.confirm": "Zablokuj",
"confirmations.delete.confirm": "Usuń",
"confirmations.delete.message": "Czy na pewno chcesz usunąć ten wpis?",
"confirmations.delete.title": "Usunąć wpis?",
"confirmations.delete.message": "Czy na pewno chcesz usunąć ten post?",
"confirmations.delete.title": "Usunąć post?",
"confirmations.delete_collection.confirm": "Usuń",
"confirmations.delete_collection.message": "Tej czynności nie da się cofnąć.",
"confirmations.delete_collection.title": "Usunąć „{name}\"?",
@@ -491,11 +491,11 @@
"confirmations.delete_list.title": "Usunąć listę?",
"confirmations.discard_draft.confirm": "Odrzuć i kontynuuj",
"confirmations.discard_draft.edit.cancel": "Wznów edytowanie",
"confirmations.discard_draft.edit.message": "Kontynuowanie spowoduje utratę wszelkich zmian wprowadzonych w aktualnie edytowanym wpisie.",
"confirmations.discard_draft.edit.title": "Czy chcesz odrzucić zmiany w swoim wpisie?",
"confirmations.discard_draft.edit.message": "Kontynuowanie spowoduje utratę wszelkich zmian wprowadzonych w aktualnie edytowanym poście.",
"confirmations.discard_draft.edit.title": "Czy chcesz odrzucić zmiany w swoim poście?",
"confirmations.discard_draft.post.cancel": "Wznów szkic",
"confirmations.discard_draft.post.message": "Kontynuowanie spowoduje usunięcie aktualnie tworzonego wpisu.",
"confirmations.discard_draft.post.title": "Odrzucić szkic wpisu?",
"confirmations.discard_draft.post.message": "Kontynuowanie spowoduje utracenie aktualnie pisanego posta.",
"confirmations.discard_draft.post.title": "Odrzucić szkic postu?",
"confirmations.discard_edit_media.confirm": "Odrzuć",
"confirmations.discard_edit_media.message": "Masz niezapisane zmiany w opisie lub podglądzie multimediów. Czy chcesz je mimo to odrzucić?",
"confirmations.follow_to_list.confirm": "Obserwuj i dodaj do listy",
@@ -507,36 +507,36 @@
"confirmations.logout.message": "Czy na pewno chcesz się wylogować?",
"confirmations.logout.title": "Wylogować?",
"confirmations.missing_alt_text.confirm": "Dodaj opis pomocniczy",
"confirmations.missing_alt_text.message": "Twój wpis zawiera multimedia bez tekstu alternatywnego. Dodanie opisów pomaga zwiększyć dostępność tych treści dla większej liczby osób.",
"confirmations.missing_alt_text.message": "Twój post zawiera multimedia bez tekstu alternatywnego. Dodanie opisów pomaga zwiększyć dostępność tych treści dla większej liczby osób.",
"confirmations.missing_alt_text.secondary": "Opublikuj mimo wszystko",
"confirmations.missing_alt_text.title": "Dodać tekst pomocniczy?",
"confirmations.mute.confirm": "Wycisz",
"confirmations.private_quote_notify.cancel": "Wróć do edycji",
"confirmations.private_quote_notify.confirm": "Opublikuj wpis",
"confirmations.private_quote_notify.confirm": "Opublikuj post",
"confirmations.private_quote_notify.do_not_show_again": "Nie pokazuj tej wiadomości ponownie",
"confirmations.private_quote_notify.message": "Osoba, którą cytujesz, a inne wzmianki zostaną powiadomione i będą mogły zobaczyć Twój post, nawet jeśli nie obserwują Ciebie.",
"confirmations.private_quote_notify.title": "Udostępnić obserwującym i wspomnianym użytkownikom?",
"confirmations.quiet_post_quote_info.dismiss": "Nie przypominaj mi ponownie",
"confirmations.quiet_post_quote_info.got_it": "Rozumiem",
"confirmations.quiet_post_quote_info.message": "Kiedy cytujesz niewidoczny wpis publiczny, twój wpis zostanie ukryty z popularnych osi czasu.",
"confirmations.quiet_post_quote_info.title": "Cytowanie niewidocznych wpisów publicznych",
"confirmations.quiet_post_quote_info.message": "Kiedy cytujesz niewidoczny post publiczny, Twój post zostanie ukryty z popularnych osi czasu.",
"confirmations.quiet_post_quote_info.title": "Cytowanie niewidocznych postów publicznych",
"confirmations.redraft.confirm": "Usuń i popraw",
"confirmations.redraft.message": "Czy na pewno chcesz usunąć i poprawić ten wpis? Polubienia, podbicia i komentarze pierwotnego wpisu zostaną utracone.",
"confirmations.redraft.title": "Usunąć i poprawić wpis?",
"confirmations.redraft.message": "Czy na pewno chcesz usunąć i przeredagować ten post? Polubienia i podbicia zostaną utracone, a komentarze do pierwotnego posta zostaną osierocone.",
"confirmations.redraft.title": "Usunąć i przeredagować post?",
"confirmations.remove_from_followers.confirm": "Usuń z obserwujących",
"confirmations.remove_from_followers.message": "{name} przestanie cię obserwować. Czy na pewno chcesz kontynuować?",
"confirmations.remove_from_followers.title": "Usunąć z obserwujących?",
"confirmations.revoke_collection_inclusion.confirm": "Usuń mnie",
"confirmations.revoke_quote.confirm": "Usuń wpis",
"confirmations.revoke_quote.confirm": "Usuń post",
"confirmations.revoke_quote.message": "Tej czynności nie można cofnąć.",
"confirmations.revoke_quote.title": "Usunąć wpis?",
"confirmations.revoke_quote.title": "Usunąć post?",
"confirmations.unblock.confirm": "Odblokuj",
"confirmations.unblock.title": "Odblokować {name}?",
"confirmations.unfollow.confirm": "Nie obserwuj",
"confirmations.unfollow.title": "Przestać obserwować {name}?",
"confirmations.withdraw_request.confirm": "Wycofaj prośbę",
"confirmations.withdraw_request.title": "Wycofać prośbę o zgodę na obserwowanie {name}?",
"content_warning.hide": "Ukryj wpis",
"content_warning.hide": "Ukryj post",
"content_warning.show": "Pokaż mimo to",
"content_warning.show_more": "Pokaż więcej",
"content_warning.show_short": "Pokaż",
@@ -549,31 +549,31 @@
"copypaste.copied": "Skopiowano",
"copypaste.copy_to_clipboard": "Skopiuj do schowka",
"custom_homepage.contact": "Kontakt:",
"custom_homepage.these_are_the_latest_posts": "To najnowsze 40 wpisów z kont na tym serwerze.",
"custom_homepage.these_are_the_latest_posts": "To są najnowsze 40 postów z kont na tym serwerze.",
"directory.federated": "Ze znanego fediwersum",
"directory.local": "Tylko z {domain}",
"directory.new_arrivals": "Nowo przybyli",
"directory.recently_active": "Ostatnio aktywni",
"disabled_account_banner.account_settings": "Ustawienia konta",
"disabled_account_banner.text": "Twoje konto {disabledAccount} jest obecnie wyłączone.",
"dismissable_banner.community_timeline": "To są najnowsze publiczne wpisy osób, których konta są na serwerze {domain}.",
"dismissable_banner.community_timeline": "To są najnowsze publiczne posty osób, których konta są na serwerze {domain}.",
"dismissable_banner.dismiss": "Odrzuć",
"dismissable_banner.public_timeline": "To są najnowsze publiczne wpisy w fediwersum od osób obserwowanych przez użytkowników serwera {domain}.",
"dismissable_banner.public_timeline": "To są najnowsze publiczne posty w fediwersum od osób obserwowanych przez użytkowników serwera {domain}.",
"domain_block_modal.block": "Blokuj serwer",
"domain_block_modal.block_account_instead": "Zamiast tego zablokuj @{name}",
"domain_block_modal.they_can_interact_with_old_posts": "Osoby z tego serwera mogą wchodzić w interakcje z twoimi starymi wpisami.",
"domain_block_modal.they_can_interact_with_old_posts": "Osoby z tego serwera mogą wchodzić w interakcje z Twoimi starymi postami.",
"domain_block_modal.they_cant_follow": "Nikt z tego serwera nie może cię obserwować.",
"domain_block_modal.they_wont_know": "Nie będą wiedzieć, że zostali zablokowani.",
"domain_block_modal.title": "Zablokować domenę?",
"domain_block_modal.you_will_lose_num_followers": "Utracisz {followersCount, plural, one {jednego obserwującego} other {{followersCountDisplay} obserwujących}} i {followingCount, plural, one {jedną osobę którą obserwujesz} few {{followingCountDisplay} osoby które obserwujesz} other {{followingCountDisplay} osób które obserwujesz}}.",
"domain_block_modal.you_will_lose_relationships": "Utracisz wszystkich obserwujących i obserwowanych z tego serwera.",
"domain_block_modal.you_wont_see_posts": "Nie zobaczysz wpisów ani powiadomień od użytkowników z tego serwera.",
"domain_block_modal.you_wont_see_posts": "Nie zobaczysz postów ani powiadomień od użytkowników z tego serwera.",
"dropdown.empty": "Wybierz opcję",
"email_subscriptions.email": "E-mail",
"email_subscriptions.form.bottom": "Otrzymuj wpisy na swoją skrzynkę bez zakładania konta na Mastodonie. Możesz zrezygnować w dowolnym momencie. Więcej informacji znajdziesz w <a>Polityce prywatności</a>.",
"email_subscriptions.form.bottom": "Otrzymuj posty na swoją skrzynkę bez zakładania konta na Mastodonie. Możesz zrezygnować w dowolnym momencie. Więcej informacji znajdziesz w <a>Polityce prywatności</a>.",
"email_subscriptions.submitted.title": "Jeszcze jeden krok",
"email_subscriptions.validation.email.invalid": "Nieprawidłowy adres e-mail",
"embed.instructions": "Umieść ten wpis na swojej stronie, kopiując poniższy kod.",
"embed.instructions": "Umieść ten post na swojej stronie poprzez skopiowanie poniższego kodu.",
"embed.preview": "Tak to będzie wyglądać:",
"emoji_button.activity": "Aktywność",
"emoji_button.clear": "Wyczyść",
@@ -595,10 +595,10 @@
"empty_column.account_featured_self.showcase_accounts_desc": "Kolekcje to wyselekcjonowane listy kont, które pomagają innym odkrywać więcej zakątków Fediwersum.",
"empty_column.account_hides_collections": "Ta osoba postanowiła nie udostępniać tych informacji",
"empty_column.account_suspended": "Konto zawieszone",
"empty_column.account_timeline": "Brak wpisów!",
"empty_column.account_timeline": "Brak postów tutaj!",
"empty_column.account_unavailable": "Profil niedostępny",
"empty_column.blocks": "Nie zablokowano jeszcze żadnych użytkowników.",
"empty_column.bookmarked_statuses": "Nie dodano jeszcze żadnego wpisu do zakładek. Gdy to zrobisz, pojawi się tutaj.",
"empty_column.bookmarked_statuses": "Nie dodano jeszcze żadnego postu do zakładek. Kiedy to zrobisz, pojawi się on tutaj.",
"empty_column.collections.featured_in": "Nie zostałeś jeszcze dodany do żadnej kolekcji.",
"empty_column.collections.featured_in_undiscoverable": "Aby inni mogli dodawać Cię do kolekcji, musisz zezwolić na wyróżnianie w miejscach do odkrywania treści w <link>Preferencje > Prywatność i zasięg</link>",
"empty_column.community": "Lokalna oś czasu jest pusta. Opublikuj coś, by ruszyć z kopyta!",
@@ -606,13 +606,13 @@
"empty_column.disabled_feed": "Ten kanał został wyłączony przez administratorów serwera.",
"empty_column.domain_blocks": "Brak zablokowanych domen.",
"empty_column.explore_statuses": "Nic nie cieszy się teraz popularnością. Sprawdź później!",
"empty_column.favourited_statuses": "Nie polubiono jeszcze żadnego wpisu. Gdy to zrobisz, pojawi się tutaj.",
"empty_column.favourites": "Nikt jeszcze nie polubił tego wpisu. Kiedy ktoś to zrobi, pojawi się tutaj.",
"empty_column.favourited_statuses": "Nie polubiono jeszcze żadnego postu. Kiedy to zrobisz, pojawi się on tutaj.",
"empty_column.favourites": "Nikt jeszcze nie polubił tego postu. Kiedy ktoś to zrobi, pojawi się tutaj.",
"empty_column.follow_requests": "Nie masz jeszcze żadnych próśb o obserwowanie. Gdy je otrzymasz, pojawią się tutaj.",
"empty_column.followed_tags": "Nie obserwujesz jeszcze żadnych hashtagów. Gdy to zrobisz, pojawią się tutaj.",
"empty_column.hashtag": "Nie ma jeszcze wpisów oznaczonych tym hasztagiem.",
"empty_column.hashtag": "Nie ma jeszcze postów oznaczonych tym tagiem.",
"empty_column.home": "Twoja główna oś czasu jest pusta! Zaobserwuj więcej osób, aby coś zobaczyć.",
"empty_column.list": "Nie ma jeszcze nic na tej liście. Kiedy osoby z tej listy opublikują nowe wpisy, pojawią się tutaj.",
"empty_column.list": "Nie ma nic na tej liście. Kiedy członkowie listy dodadzą nowe posty, pojawia się one tutaj.",
"empty_column.mutes": "Nie wyciszono jeszcze żadnego użytkownika.",
"empty_column.notification_requests": "Wszystko przeczytane! Gdy otrzymasz nowe powiadomienia, pojawią się tutaj zgodnie z twoimi ustawieniami.",
"empty_column.notifications": "Nie masz jeszcze żadnych powiadomień. Gdy inne osoby wejdą z tobą w interakcję, zobaczysz to tutaj.",
@@ -627,20 +627,20 @@
"explore.suggested_follows": "Ludzie",
"explore.title": "Na czasie",
"explore.trending_links": "Aktualności",
"explore.trending_statuses": "Wpisy",
"explore.trending_statuses": "Posty",
"explore.trending_tags": "Hasztagi",
"featured_carousel.header": "{count, plural, one {przypięty wpis} few {przypięte wpisy} many {przypięte wpisy} other {przypięte wpisy}}",
"featured_carousel.header": "{count, plural, one {Przypięty post} few {Przypięte posty} many {Przypięte posty} other {Przypięte posty}}",
"featured_tags.more_items": "+{count}",
"featured_tags.suggestions.add": "Dodaj",
"featured_tags.suggestions.dismiss": "Nie, dziękuję",
"filter_modal.added.context_mismatch_explanation": "To filtrowanie nie dotyczy kategorii, w której pojawił się ten wpis. Jeśli chcesz, aby wpis był filtrowany również w tym kontekście, musisz edytować ustawienia filtrowania.",
"filter_modal.added.context_mismatch_explanation": "To filtrowanie nie dotyczy kategorii, w której pojawił się ten post. Jeśli chcesz, aby ten post był filtrowany również w tym kontekście, musisz edytować ustawienia filtrowania.",
"filter_modal.added.context_mismatch_title": "Niewłaściwy kontekst!",
"filter_modal.added.expired_explanation": "Ta kategoria filtrowania wygasła, aby ją zastosować, należy zmienić datę wygaśnięcia.",
"filter_modal.added.expired_title": "Filtr wygasł!",
"filter_modal.added.review_and_configure": "Aby przejrzeć i skonfigurować tę kategorię filtrowania, przejdź do {settings_link}.",
"filter_modal.added.review_and_configure_title": "Ustawienia filtrowania",
"filter_modal.added.settings_link": "strona ustawień",
"filter_modal.added.short_explanation": "Ten wpis został dodany do następującej kategorii filtrowania: {title}.",
"filter_modal.added.short_explanation": "Ten post został dodany do następującej kategorii filtrowania: {title}.",
"filter_modal.added.title": "Filtrowanie zostało dodane!",
"filter_modal.select_filter.context_mismatch": "nie ma zastosowania w tym kontekście",
"filter_modal.select_filter.expired": "wygasły",
@@ -725,6 +725,7 @@
"home.pending_critical_update.link": "Zobacz aktualizacje",
"home.pending_critical_update.title": "Dostępna krytyczna aktualizacja bezpieczeństwa!",
"home.show_announcements": "Pokaż ogłoszenia",
"ignore_notifications_modal.bots_title": "Ignorować powiadomienia od botów?",
"ignore_notifications_modal.disclaimer": "Mastodon nie informuje nikogo o zignorowaniu powiadomienia. Ignorowanie powiadomień nie zapobiegnie wysyłaniu samych wiadomości.",
"ignore_notifications_modal.filter_instead": "Zamiast tego odfiltruj",
"ignore_notifications_modal.filter_to_act_users": "Przyjmowanie, odrzucanie i zgłaszanie innych będzie nadal możliwe",
@@ -917,7 +918,7 @@
"notification.relationships_severance_event.account_suspension": "Administrator {from} zawiesił {target}, co oznacza, że nie możesz już otrzymywać aktualności ani wchodzić w interakcje z tą osobą.",
"notification.relationships_severance_event.domain_block": "Administrator {from} zablokował {target}, w tym {followersCount} twoich obserwujących i {followingCount, plural, one {# konto} few {# konta} other {# kont}}, które obserwujesz.",
"notification.relationships_severance_event.learn_more": "Dowiedz się więcej",
"notification.relationships_severance_event.user_domain_block": "Zablokowałeś {target}, w tym {followersCount} twoich obserwujących i {followingCount, plural, one {# konto} few {# konta} other {# kont}}, które obserwujesz.",
"notification.relationships_severance_event.user_domain_block": "Zablokowano {target}, w tym {followersCount} Twoich obserwujących i {followingCount, plural, one {# konto} few {# konta} other {# kont}}, które obserwujesz.",
"notification.status": "{name} opublikował(a) nowy wpis",
"notification.update": "{name} edytował(a) post",
"notification_requests.accept": "Akceptuj",
@@ -999,12 +1000,14 @@
"notifications_permission_banner.title": "Nigdy niczego nie przegapisz",
"onboarding.follows.back": "Wróć",
"onboarding.follows.empty": "Niestety, w tej chwili nie można nic wyświetlić. Możesz użyć wyszukiwania lub przeglądać stronę główną, aby znaleźć osoby, które chcesz obserwować, albo spróbuj ponownie później.",
"onboarding.follows.next": "Następnie: ustaw swój profil",
"onboarding.follows.search": "Szukaj",
"onboarding.follows.title": "Zaobserwuj kogoś, aby zacząć",
"onboarding.profile.discoverable": "Spraw, by mój profil był widoczny",
"onboarding.profile.discoverable_hint": "Gdy zdecydujesz się na włączenie widoczności na Mastodon, twoje wpisy mogą pojawiać się w wynikach wyszukiwania i aktualnościach, a twój profil może być polecany osobom o podobnych zainteresowaniach.",
"onboarding.profile.display_name": "Wyświetlana nazwa",
"onboarding.profile.display_name_hint": "Twoje imię lub pseudonim…",
"onboarding.profile.finish": "Zakończ",
"onboarding.profile.note": "Opis",
"onboarding.profile.note_hint": "Możesz @wzmiankować innych lub dodawać #hashtagi…",
"onboarding.profile.title": "Ustawienia profilu",
@@ -1040,6 +1043,7 @@
"privacy_policy.title": "Polityka prywatności",
"quote_error.edit": "Podczas edycji wpisu nie można dodawać cytatów.",
"quote_error.poll": "W ankietach nie można cytować.",
"quote_error.private_mentions": "Cytowanie nie jest dozwolone w przypadku wzmianek bezpośrednich.",
"quote_error.quote": "Dozwolone jest tylko jedno cytowanie na raz.",
"quote_error.unauthorized": "Nie masz uprawnień do cytowania tego wpisu.",
"quote_error.upload": "Cytowanie nie jest dozwolone w przypadku załączników multimedialnych.",
@@ -1071,6 +1075,9 @@
"report.categories.spam": "Spam",
"report.categories.violation": "Zawartość narusza co najmniej jedną zasadę serwera",
"report.category.subtitle": "Wybierz najbardziej pasującą opcję",
"report.category.title_account": "Powiedz, co się dzieje z tym profilem",
"report.category.title_collection": "Powiedz, co się dzieje z tą kolekcją",
"report.category.title_status": "Powiedz, co się dzieje z tym postem",
"report.close": "Gotowe",
"report.comment.title": "Czy jest coś jeszcze, co powinniśmy wiedzieć?",
"report.forward": "Prześlij do {target}",
@@ -1143,12 +1150,15 @@
"server_banner.active_users": "aktywni użytkownicy",
"server_banner.administered_by": "Zarządzana przez:",
"server_banner.is_one_of_many": "{domain} jest jedną z wielu niezależnych serwerów Mastodon, których możesz użyć by uczestniczyć w fediwersum.",
"server_banner.more_about_this_server": "Więcej o tym serwerze",
"server_banner.server_stats": "Statystyki serwera:",
"sign_in_banner.create_account": "Załóż konto",
"sign_in_banner.follow_anyone": "Obserwuj kogokolwiek z fediwersum w kolejności chronologicznej. Bez algorytmów ani reklam.",
"sign_in_banner.mastodon_is": "Mastodon to najlepszy sposób nadążania za bieżącymi zdarzeniami.",
"sign_in_banner.sign_in": "Zaloguj się",
"sign_in_banner.sso_redirect": "Zaloguj/zarejestruj się",
"skip_links.skip_to_content": "Przejdź do głównej treści",
"skip_links.skip_to_navigation": "Przejdź do głównej nawigacji",
"status.admin_account": "Otwórz interfejs moderacyjny dla @{name}",
"status.admin_domain": "Otwórz interfejs moderacyjny dla {domain}",
"status.admin_status": "Otwórz ten wpis w interfejsie moderacyjnym",
@@ -1156,6 +1166,7 @@
"status.block": "Zablokuj @{name}",
"status.bookmark": "Dodaj zakładkę",
"status.cancel_reblog_private": "Cofnij podbicie",
"status.cannot_edit": "Nie masz uprawnień, aby edytować ten post",
"status.cannot_quote": "Nie można cytować tego wpisu",
"status.cannot_reblog": "Ten wpis nie może zostać podbity",
"status.contains_quote": "Zawiera cytat",
@@ -1191,9 +1202,10 @@
"status.mute_conversation": "Wycisz konwersację",
"status.open": "Rozszerz ten wpis",
"status.pin": "Przypnij do profilu",
"status.public_only": "Ten post jest prywatny",
"status.quote": "Cytuj",
"status.quote.cancel": "Anuluj cytat",
"status.quote_error.blocked_account_hint.title": "Ten wpis jest ukryty, ponieważ zablokowałeś(aś) @{name}.",
"status.quote_error.blocked_account_hint.title": "Ten post jest ukryty, ponieważ zablokowano użytkownika @{name}.",
"status.quote_error.blocked_domain_hint.title": "Ten wpis jest ukryty, ponieważ zablokowano {domain}.",
"status.quote_error.filtered": "Ukryte z powodu jednego z Twoich filtrów",
"status.quote_error.limited_account_hint.action": "Pokaż mimo wszystko",
+2
View File
@@ -2,6 +2,8 @@
@use 'mastodon/mixins';
@use 'fonts/roboto';
@use 'fonts/roboto-mono';
@use 'fonts/inter';
@use 'fonts/syne';
@use 'mastodon/reset';
@use 'mastodon/tokens';
@@ -1,4 +1,4 @@
@use '../fonts/inter';
@use '../fonts/inter-mailer';
body {
accent-color: #6364ff;
@@ -0,0 +1,8 @@
@font-face {
font-family: Inter;
src: url('../../fonts/inter/inter-variable-font-slnt-wght.woff2')
format('woff2-variations');
font-weight: 100 900;
font-style: normal;
mso-generic-font-family: swiss;
}
+31 -4
View File
@@ -1,8 +1,35 @@
// Regular
@font-face {
font-family: Inter;
src: url('../../fonts/inter/inter-variable-font-slnt-wght.woff2')
format('woff2-variations');
font-weight: 100 900;
src: url('../../fonts/inter/inter-regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
mso-generic-font-family: swiss;
font-display: swap;
}
// Italic
@font-face {
font-family: Inter;
src: url('../../fonts/inter/inter-italic.woff2') format('woff2');
font-weight: 400;
font-style: italic;
font-display: swap;
}
// SemiBold (native 600, mapped to 700 so that `font-weight: bold` uses it)
@font-face {
font-family: Inter;
src: url('../../fonts/inter/inter-semibold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
// SemiBold Italic (native 600, mapped to 700 so that `font-weight: bold` uses it)
@font-face {
font-family: Inter;
src: url('../../fonts/inter/inter-semibold-italic.woff2') format('woff2');
font-weight: 700;
font-style: italic;
font-display: swap;
}
+7
View File
@@ -0,0 +1,7 @@
@font-face {
font-family: Syne;
src: url('../../fonts/syne/syne-bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
+11 -11
View File
@@ -3,7 +3,7 @@
*/
@mixin type-heading-lg {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-3xl);
font-weight: bold;
line-height: var(--lh-tighter);
@@ -11,7 +11,7 @@
}
@mixin type-heading-md {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-2xl);
font-weight: bold;
line-height: var(--lh-tighter);
@@ -19,7 +19,7 @@
}
@mixin type-heading-sm {
// font-family: Syne;
font-family: var(--font-heading);
font-size: var(--fs-xl);
font-weight: bold;
line-height: var(--lh-tight);
@@ -27,7 +27,7 @@
}
@mixin type-body-lg {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-lg);
font-weight: normal;
line-height: var(--lh-normal);
@@ -35,7 +35,7 @@
}
@mixin type-body-strong {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-md);
font-weight: bold;
line-height: var(--lh-normal);
@@ -43,7 +43,7 @@
}
@mixin type-body {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-md);
font-weight: normal;
line-height: var(--lh-normal);
@@ -51,7 +51,7 @@
}
@mixin type-body-compact {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-sm);
font-weight: normal;
line-height: var(--lh-tight);
@@ -59,7 +59,7 @@
}
@mixin type-label-lg {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-sm);
font-weight: bold;
line-height: var(--lh-tight);
@@ -67,7 +67,7 @@
}
@mixin type-label-md {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -75,7 +75,7 @@
}
@mixin type-label-sm {
// font-family: Inter;
font-family: var(--font-body);
font-size: var(--fs-2xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -83,7 +83,7 @@
}
@mixin type-micro {
// font-family: 'JetBrains Mono';
font-family: var(--font-monospace);
font-size: var(--fs-3xs);
font-weight: normal;
line-height: var(--lh-tighter);
@@ -13,6 +13,3 @@ $no-gap-breakpoint: 1175px;
$mobile-menu-breakpoint: 760px;
$mobile-breakpoint: 630px;
$no-columns-breakpoint: 600px;
$font-sans-serif: 'mastodon-font-sans-serif' !default;
$font-monospace: 'mastodon-font-monospace' !default;
+9 -3
View File
@@ -8,6 +8,14 @@ html {
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
}
--font-body: mastodon-font-sans-serif, sans-serif;
--font-heading: Syne, sans-serif;
--font-monospace: mastodon-font-monospace, monospace;
&[data-redesign='true'] {
--font-body: Inter, sans-serif;
}
--outline-focus-default: 2px solid var(--color-border-brand);
--avatar-border-radius: 8px;
--max-media-height-small: 460px;
@@ -45,7 +53,7 @@ html.has-modal {
}
body {
font-family: $font-sans-serif, sans-serif;
font-family: var(--font-body);
background: var(--color-bg-primary);
font-size: 13px;
line-height: 18px;
@@ -73,7 +81,6 @@ body {
// Fira Sans => Firefox OS
// Droid Sans => Older Androids (<4.0)
// Helvetica Neue => Older macOS <10.11
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
font-family:
system-ui,
-apple-system,
@@ -85,7 +92,6 @@ body {
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
$font-sans-serif,
sans-serif;
}
@@ -984,7 +984,7 @@ body > [data-popover-placement] {
.character-counter {
cursor: default;
font-family: $font-sans-serif, sans-serif;
font-family: var(--font-body);
font-size: 14px;
font-weight: 400;
line-height: normal;
+4 -4
View File
@@ -2,7 +2,7 @@
@use 'variables' as *;
code {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
font-weight: 400;
}
@@ -895,7 +895,7 @@ code {
width: 100%;
border: 0;
padding: 10px;
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
background: var(--color-bg-secondary);
color: var(--color-text-primary);
font-size: 14px;
@@ -1146,7 +1146,7 @@ code {
.form_admin_settings_custom_css,
.form_admin_settings_closed_registrations_message {
textarea {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
}
@@ -1171,7 +1171,7 @@ code {
border: 0;
padding: 10px;
font-size: 14px;
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
button {
+1 -1
View File
@@ -168,7 +168,7 @@
}
samp {
font-family: $font-monospace, monospace;
font-family: var(--font-monospace);
}
button.table-action-link {
+2 -1
View File
@@ -397,11 +397,12 @@ export function unicodeEmojiFactory(
data: Partial<UnicodeEmojiData> = {},
): UnicodeEmojiData {
return {
emoticons: undefined,
hexcode: 'test',
label: 'Test',
unicode: '🧪',
shortcodes: ['test_emoji'],
tokens: ['emoji', 'test'],
tokens: ['test', 'emoji'],
group: 1,
order: 1,
...data,
+12
View File
@@ -49,7 +49,13 @@ az:
domain_blocks:
export: Xaricə köçür
email_subscriptions:
additional_footer_texts:
show:
title: Əlavə alt məlumat mətni
compliance_settings:
additional_footer_text:
hint: Yalnız bülleten e-poçtlarının alt məlumatlarında görünən ixtiyari mətn
title: Əlavə alt məlumat mətni
title: Riayətlilik ayarları
danger_zone:
erase_all_data:
@@ -112,6 +118,8 @@ az:
application: Tətbiq
metadata: Meta veri
system_checks:
elasticsearch_running_check:
message_html: Elasticsearch-a bağlana bilmədi. Lütfən çalışdığına əmin olun və ya tam mətn axtarışını sıradan çıxardın
elasticsearch_version_check:
message_html: 'Uyumlu olmayan Elasticsearch versiyası: %{value}'
tags:
@@ -175,6 +183,8 @@ az:
account_status: Hesab statusu
functional: Hesabınız tamamilə işləkdir.
self_destruct: "%{domain} bağlandığı üçün, hesabınıza yalnız məhdud erişiminiz olacaq."
author_attribution:
example_title: Nümunə mətn
challenge:
hint_html: "<strong>İpucu:</strong> Sonrakı bir saat ərzində sizdən parolu soruşmayacağıq."
invalid_password: Yararsız parol
@@ -199,6 +209,8 @@ az:
public: Ümumi zaman xətləri
edit:
statuses_hint_html: Bu filtr, aşağıdakı açar sözləri ilə uyuşmasından asılı olmayaraq fərdi göndərişləri seçmək üçün tətbiq olunur. <a href="%{path}">Göndərişləri incələyin və ya filtrdən silin</a>.
errors:
invalid_context: Heç bir kontekts yoxdur və ya yararsız kontekts təqdim olunub
index:
contexts: "%{contexts} üzrə filtrlər"
empty: Filtriniz yoxdur.
+4
View File
@@ -696,6 +696,7 @@ fa:
new:
title: ایجاد قانون جدید آی پی
no_ip_block_selected: هیچ قاعدهٔ آی‌پی‌ای تغییری نکرد زیرا هیچ‌کدام گزیده نشده بودند
search: جست‌و‌جو
title: قوانین آی پی
relationships:
title: روابط %{acct}
@@ -1180,6 +1181,7 @@ fa:
other: در هفته گذشته توسط %{count} نفر استفاده شده است
title: توصیه ها و روندها
trending: پرطرفدار
update_available: به‌روزرسانی دردسترس است
username_blocks:
add_new: افزودن جدید
block_registrations: انسداد ثبت‌نام‌ها
@@ -1491,6 +1493,7 @@ fa:
changed_your_mind: نظرتان عوض شد؟
title: نام نوشتید
unsubscribe: لغو اشتراک
disabled: از کار افتاده
inactive: غیرفعّال
status: وضعیت
subscribers: مشترکان
@@ -1528,6 +1531,7 @@ fa:
bookmarks: نشانک‌ها
csv: CSV
domain_blocks: دامنه‌های مسدود شده
json: JSON
lists: سیاهه‌ها
mutes: حساب‌های بی‌صداشده
storage: تصویرهای ذخیره‌شده
+3 -3
View File
@@ -1803,7 +1803,7 @@ pl:
moderation:
title: Moderacja
move_handler:
carry_blocks_over_text: Ten użytkownik przeniósł się z konta %{acct}, które zablokowałeś(-aś).
carry_blocks_over_text: Ten użytkownik przeniósł się z konta %{acct}, które zablokowano.
carry_mutes_over_text: Ten użytkownik przeniósł się z konta %{acct}, które wyciszyłeś(-aś).
copy_account_note_text: 'Ten użytkownik przeniósł się z konta %{acct}, oto Twoje poprzednie notatki o nim:'
navigation:
@@ -1894,11 +1894,11 @@ pl:
privacy:
hint_html: "<strong>Dostosuj tryb odnajdowania twojego profilu i wpisów.</strong> Funkcje Mastodona mogą pomóc ci zwiększać twoją publiczność – przejrzyj te ustawienia i dostosuj je do swojego sposobu użytkowania."
privacy: Prywatność
privacy_hint_html: Ustaw, ile chcesz ujawniać innym. Ciekawe profile i programy często znajduje się przy przeglądaniu cudzych list obserwowanych i tego, z jakich programów zamieszczają, ale może wolisz to ukryć.
privacy_hint_html: Kontroluj, ile chcesz ujawniać innym. Ludzie odkrywają ciekawe profile i aplikacje przy przeglądaniu cudzych list obserwowanych i tego, z jakich aplikacji publikują posty, ale może wolisz to ukryć.
reach: Zasięg
reach_hint_html: Ustaw, czy chcesz dać się odkryć i zaobserwować. Chcesz, żeby twoje wpisy pojawiały się w zakładce "Odkrywaj"? Chcesz, żeby sugerowano twoje konto do obserwacji? Chcesz przyjmować nowych obserwujących automatycznie, czy aprobować ich ręcznie?
search: Wyszukiwanie
search_hint_html: Ustaw, w jakim zakresie będziesz znajdowalny(a). Chcesz pojawiać się w wynikach po twoich publicznych wpisach? Chcesz by twój profil dało się znaleźć spoza Mastodona? Pamiętaj, że nie da się zapewnić całkowitego wykluczenia wszystkich informacji publicznie dostępnych z wyszukiwarek.
search_hint_html: Kontroluj zakres znajdowalności swojego profilu. Chcesz, aby inni mogli znaleźć Cię po Twoich publicznych wpisach? Chcesz, aby Twój profil dało się znaleźć poza Mastodonem podczas przeszukiwania internetu? Pamiętaj, że nie da się zapewnić całkowitego wykluczenia wszystkich publicznie dostępnych informacji z wyszukiwarek.
title: Prywatność i zasięg
privacy_policy:
title: Polityka prywatności
+2 -2
View File
@@ -786,8 +786,8 @@ ru:
are_you_sure: Вы уверены?
assign_to_self: Назначить себя
assigned: Назначенный модератор
by_target_domain: Домен объекта жалобы
cancel: Отменить
by_target_domain: Домен фигурирующего в жалобе пользователя
cancel: Отмена
category: Категория
category_description_html: Причина, по которой были доложены этот пользователь или содержимое, будет указана при коммуникации с фигурирующим в жалобе пользователем
collections: Подборки (%{count})
+3
View File
@@ -30,10 +30,13 @@ az:
labels:
account:
show_collections: Profildə izlənilənləri və izləyiciləri göstər
account_warning_preset:
text: Ön ayarlanmış mətn
defaults:
autofollow: Hesabınızı izləməyə dəvət edin
confirm_new_password: Yeni parolu təsdiqlə
confirm_password: Parolu təsdiqlə
context: Kontektsləri filtrlə
current_password: Hazırkı parol
data: Veri
display_name: Ekran adı
+2 -2
View File
@@ -133,7 +133,7 @@ pl:
webauthn: Jeżeli jest to klucz USB, upewnij się, że go włożyłeś i, jeśli to konieczne, naciśnij go.
settings:
indexable: Twój profil pojawi się w wynikach wyszukiwarek internetowych.
show_application: Ty zawsze widzisz program użyty do zamieszczenia.
show_application: Zawsze będziesz móc widzieć aplikację użytą do opublikowania Twoich postów niezależnie od tej opcji.
tag:
name: Możesz zmieniać tylko wielkość liter, np. aby były bardziej widoczne
terms_of_service:
@@ -360,7 +360,7 @@ pl:
settings:
email_subscriptions: Włącz rejestracje przez adres e-mail
indexable: Udostępniaj profil wyszukiwarkom
show_application: Pokazuj program z którego zamieszczasz wpisy
show_application: Pokazuj aplikację użytą do opublikowania Twoich postów
tag:
listable: Pozwól, aby ten hashtag pojawiał się w wynikach wyszukiwania i katalogu profilów
name: Hasztag
+1 -1
View File
@@ -177,7 +177,7 @@
"msw": "^2.12.1",
"msw-storybook-addon": "^2.0.6",
"oxfmt": "^0.47.0",
"playwright": "^1.60.0",
"playwright": "^1.61.1",
"storybook": "^10.3.0",
"stylelint": "^17.0.0",
"stylelint-config-standard-scss": "^17.0.0",
@@ -32,7 +32,7 @@ RSpec.describe 'Content-Security-Policy' do
img-src 'self' data: blob: #{local_domain}
manifest-src 'self' #{local_domain}
media-src 'self' data: #{local_domain}
script-src 'self' #{local_domain} 'wasm-unsafe-eval' 'sha256-Z5KW83D+6/pygIQS3h9XDpF52xW3l3BHc7JL9tj3uMs='
script-src 'self' #{local_domain} 'wasm-unsafe-eval' 'sha256-OgOg5CGI7D4Syg38sNIknJKO+3DCTdpfY1ciC+Bklaw='
style-src 'self' #{local_domain} 'nonce-ZbA+JmE7+bK8F5qvADZHuQ=='
worker-src 'self' blob: #{local_domain}
CSP
+79 -79
View File
@@ -2569,12 +2569,12 @@ __metadata:
languageName: node
linkType: hard
"@formatjs/icu-messageformat-parser@npm:3.5.14":
version: 3.5.14
resolution: "@formatjs/icu-messageformat-parser@npm:3.5.14"
"@formatjs/icu-messageformat-parser@npm:3.5.15":
version: 3.5.15
resolution: "@formatjs/icu-messageformat-parser@npm:3.5.15"
dependencies:
"@formatjs/icu-skeleton-parser": "npm:2.1.11"
checksum: 10c0/5cb5375fa41c0ec62dc414ba7b0740319eeb1550d5ad338cdcea0f3d8490b82d2f3114bc5a7e03b15ebe69afb426fb2ee1023cb4d9779636120eb00b7bd875f4
checksum: 10c0/f396742c2a5b25bd0499528528955c8ca6685f054a5339b8fddce982703b022d0bfa357239c9607938a0fa88fa9e267dec7fd2a744718715f1538450aca100a7
languageName: node
linkType: hard
@@ -2604,12 +2604,12 @@ __metadata:
languageName: node
linkType: hard
"@formatjs/intl-localematcher@npm:0.8.12":
version: 0.8.12
resolution: "@formatjs/intl-localematcher@npm:0.8.12"
"@formatjs/intl-localematcher@npm:0.8.13":
version: 0.8.13
resolution: "@formatjs/intl-localematcher@npm:0.8.13"
dependencies:
"@formatjs/fast-memoize": "npm:3.1.7"
checksum: 10c0/2de705d6a800f2d406c7cffdb4c61bc81683cc2e96bb3f0d3a813d04879358a0601c06dc0bf38d8bb60a9ef5737384423773182327de5aadea1cce6375639247
checksum: 10c0/8b36937837751b71c4957cfbae6f515edc9faf2ae341de0529b444aa8e1cdee19f59dce1c7c8b30f315aff082fd97dc96f27ea4e2cbadafb3c1d34247244e664
languageName: node
linkType: hard
@@ -2623,31 +2623,31 @@ __metadata:
linkType: hard
"@formatjs/intl-pluralrules@npm:^6.0.0":
version: 6.3.12
resolution: "@formatjs/intl-pluralrules@npm:6.3.12"
version: 6.3.13
resolution: "@formatjs/intl-pluralrules@npm:6.3.13"
dependencies:
"@formatjs/bigdecimal": "npm:0.2.7"
"@formatjs/intl-localematcher": "npm:0.8.12"
checksum: 10c0/b54b94913707c2d7005f1895e08c87468ea4b64a03e7262df976b2e5adb35d1a6c7cc38f28b41580a330162074ff6ba60dc16db7dc7f4ec34e4e262e630df287
"@formatjs/intl-localematcher": "npm:0.8.13"
checksum: 10c0/7002a52e3d0d1126ef2e1703c0078dde2a33b162170d880da6f1aeae3e559487ec832761c115b76df2cbf7a4d1b40e648f0154b762b4acb9a78315a2990b4ea9
languageName: node
linkType: hard
"@formatjs/intl@npm:4.1.16":
version: 4.1.16
resolution: "@formatjs/intl@npm:4.1.16"
"@formatjs/intl@npm:4.1.17":
version: 4.1.17
resolution: "@formatjs/intl@npm:4.1.17"
dependencies:
"@formatjs/fast-memoize": "npm:3.1.7"
"@formatjs/icu-messageformat-parser": "npm:3.5.14"
intl-messageformat: "npm:11.2.11"
checksum: 10c0/1a8fcecb85bf9c563195104b6cfca5dd76f015f6a9d750de105e7d8f9405be1258131f09a1861c881c283133d0ff3c6aafaf17191bb233c5c2b8ec0dc6e7bbd7
"@formatjs/icu-messageformat-parser": "npm:3.5.15"
intl-messageformat: "npm:11.2.12"
checksum: 10c0/1a041f0ffb3fe24ffc32a6e23bd03da9a5293f559fe4a4b50fa20ea25a9bfe38c6d474a5517ea164c10528314c11538e50393c693e2342cd11f1db5d78db08d2
languageName: node
linkType: hard
"@formatjs/ts-transformer@npm:4.4.16":
version: 4.4.16
resolution: "@formatjs/ts-transformer@npm:4.4.16"
"@formatjs/ts-transformer@npm:4.4.17":
version: 4.4.17
resolution: "@formatjs/ts-transformer@npm:4.4.17"
dependencies:
"@formatjs/icu-messageformat-parser": "npm:3.5.14"
"@formatjs/icu-messageformat-parser": "npm:3.5.15"
"@types/babel__core": "npm:7"
"@types/node": "npm:22 || 24"
json-stable-stringify: "npm:1"
@@ -2657,7 +2657,7 @@ __metadata:
peerDependenciesMeta:
ts-jest:
optional: true
checksum: 10c0/3b8067ddb76376dc739bd3cce1892da5d03617708bbf06d4722ed1266afa9d668e1cfb6441de375724b9d3d1f3c780232780e5e768460a846e15e9da469ea074
checksum: 10c0/a49ac01114e4092eae28954e10b184ae10a18c1f5c97e799bdcd09a3d87fbe289080f3bd4ebbbf9effbbf9483ddb532b77ff31a6f692adba4438d9ad1ae8ae19
languageName: node
linkType: hard
@@ -2679,12 +2679,12 @@ __metadata:
linkType: hard
"@formatjs/unplugin@npm:^1.1.5":
version: 1.2.1
resolution: "@formatjs/unplugin@npm:1.2.1"
version: 1.2.3
resolution: "@formatjs/unplugin@npm:1.2.3"
dependencies:
"@bazel/runfiles": "npm:6"
"@formatjs/icu-messageformat-parser": "npm:3.5.14"
"@formatjs/ts-transformer": "npm:4.4.16"
"@formatjs/icu-messageformat-parser": "npm:3.5.15"
"@formatjs/ts-transformer": "npm:4.4.17"
"@types/node": "npm:22 || 24"
decode-named-character-reference: "npm:1"
magic-string: "npm:0"
@@ -2707,7 +2707,7 @@ __metadata:
optional: true
webpack:
optional: true
checksum: 10c0/1222ad39f619293a836b7fef28b6f71db3657850549ef909dd840cfca5d9bc070c838e47b9ea7a5cd328e104c34ff0420c2aba2bec356e649284226bdfad3666
checksum: 10c0/c63a9077906af7d612e5d5a505947852e7bc90e62cf8455c510b68355b9d9a6f529b13e98dc71c6a682d7343b51be67624925a441cba86c0f21d48b28d8ab5e5
languageName: node
linkType: hard
@@ -3043,7 +3043,7 @@ __metadata:
msw-storybook-addon: "npm:^2.0.6"
oxfmt: "npm:^0.47.0"
path-complete-extname: "npm:^1.0.0"
playwright: "npm:^1.60.0"
playwright: "npm:^1.61.1"
postcss-preset-env: "npm:^11.0.0"
prop-types: "npm:^15.8.1"
punycode: "npm:^2.3.0"
@@ -5369,8 +5369,8 @@ __metadata:
linkType: hard
"@vitejs/plugin-legacy@npm:^8.0.0":
version: 8.2.0
resolution: "@vitejs/plugin-legacy@npm:8.2.0"
version: 8.2.1
resolution: "@vitejs/plugin-legacy@npm:8.2.1"
dependencies:
"@babel/core": "npm:^7.29.7"
"@babel/plugin-transform-dynamic-import": "npm:^7.29.7"
@@ -5378,7 +5378,7 @@ __metadata:
"@babel/preset-env": "npm:^7.29.7"
babel-plugin-polyfill-corejs3: "npm:^0.14.2"
babel-plugin-polyfill-regenerator: "npm:^0.6.8"
browserslist: "npm:^4.28.4"
browserslist: "npm:^4.28.6"
browserslist-to-esbuild: "npm:^2.1.1"
core-js: "npm:^3.49.0"
magic-string: "npm:^0.30.21"
@@ -5387,7 +5387,7 @@ __metadata:
peerDependencies:
terser: ^5.16.0
vite: ^8.0.0
checksum: 10c0/1643b7b15c9231465c03445730ba4898be74aff539f834d683e6d107f94480581b7a2119a1d047f725dc92398280e5bb19b82a1c57962c93809f4470e29c75ce
checksum: 10c0/c9c65e1c89f93f22d34dccf27fbf2b7ed63be708819741eb4c8efe329911b8dd904d658e9ba7e287da6af7745bd87e870e4237e0b08a2a39c9628df0d3008e6c
languageName: node
linkType: hard
@@ -6187,18 +6187,18 @@ __metadata:
languageName: node
linkType: hard
"browserslist@npm:^4.24.0, browserslist@npm:^4.28.1, browserslist@npm:^4.28.2, browserslist@npm:^4.28.4":
version: 4.28.5
resolution: "browserslist@npm:4.28.5"
"browserslist@npm:^4.24.0, browserslist@npm:^4.28.1, browserslist@npm:^4.28.2, browserslist@npm:^4.28.6":
version: 4.28.6
resolution: "browserslist@npm:4.28.6"
dependencies:
baseline-browser-mapping: "npm:^2.10.42"
caniuse-lite: "npm:^1.0.30001800"
electron-to-chromium: "npm:^1.5.387"
node-releases: "npm:^2.0.50"
caniuse-lite: "npm:^1.0.30001803"
electron-to-chromium: "npm:^1.5.389"
node-releases: "npm:^2.0.51"
update-browserslist-db: "npm:^1.2.3"
bin:
browserslist: cli.js
checksum: 10c0/d6bb4ab286a7071db52cbeabd46ff816e09c9171d7e5da246f0b9489601ad3d4adb9fc3d14fa934a8646078f8a717507c0518a364128735a3b5a7875900b5a19
checksum: 10c0/259e3c2e0e59daf1fab0889303d397b35505c1c910e503a329990c4f6c0e589c0959fcd2627487311e4a94d7b9e2a9b1fa02875592f5c98b8e9e03e0ccd1e3ea
languageName: node
linkType: hard
@@ -6321,10 +6321,10 @@ __metadata:
languageName: node
linkType: hard
"caniuse-lite@npm:^1.0.30001787, caniuse-lite@npm:^1.0.30001800":
version: 1.0.30001803
resolution: "caniuse-lite@npm:1.0.30001803"
checksum: 10c0/71586e9c84633cf766b208448eb76f860ec6e3befffc626d1f004e1902da063a7ab96cc94d1f4b36c0324e12997b3325a726de3287edfec91d0df495627a1d43
"caniuse-lite@npm:^1.0.30001787, caniuse-lite@npm:^1.0.30001803":
version: 1.0.30001806
resolution: "caniuse-lite@npm:1.0.30001806"
checksum: 10c0/9442c8afff0968e9b2ce0104a7340c1ce4a5c09f469ccb9eef10d25712ea0afe542486e5318c697c70dd502f988cfc04eaa1c9438c92ac3bcf4d708a2a17bee1
languageName: node
linkType: hard
@@ -7142,10 +7142,10 @@ __metadata:
languageName: node
linkType: hard
"electron-to-chromium@npm:^1.5.387":
version: 1.5.389
resolution: "electron-to-chromium@npm:1.5.389"
checksum: 10c0/3681a3245fef5dfc8d9cdee231e80f8fe4fd7a87713d3a29a21ae2ec0cb6995cf14f3b3fd9e3fa8b483256e28ba2fa1daa9f23e93911a3a7241cd8f5daee9665
"electron-to-chromium@npm:^1.5.389":
version: 1.5.392
resolution: "electron-to-chromium@npm:1.5.392"
checksum: 10c0/13b691fb97ef02f6c3da6fecb530d667a2c72c951aaca2c5c13271074d6e2f9a9bb23c84939a6b9274fef1611247f3a7affba7b3961d0bdc0324d59f97046269
languageName: node
linkType: hard
@@ -8987,13 +8987,13 @@ __metadata:
languageName: node
linkType: hard
"intl-messageformat@npm:11.2.11, intl-messageformat@npm:^11.0.0":
version: 11.2.11
resolution: "intl-messageformat@npm:11.2.11"
"intl-messageformat@npm:11.2.12, intl-messageformat@npm:^11.0.0":
version: 11.2.12
resolution: "intl-messageformat@npm:11.2.12"
dependencies:
"@formatjs/fast-memoize": "npm:3.1.7"
"@formatjs/icu-messageformat-parser": "npm:3.5.14"
checksum: 10c0/5c77af3dfc1a26f48d7cb3544d74299f6b5dd2ecac703bffff22ba2343cb87518a3a08ad9106a41a56e45e91831570b2da84f0c48f47fa7b250dc389b9bb8edf
"@formatjs/icu-messageformat-parser": "npm:3.5.15"
checksum: 10c0/8a6ef496bf857b5a1bfa667af775ab41cb78f71e24dfb83ef9b4095b9f807d6ec796392086b47ac003341e4413d87ce7b8af1f0b36717bb86714306b4ba425db
languageName: node
linkType: hard
@@ -10532,7 +10532,7 @@ __metadata:
languageName: node
linkType: hard
"node-releases@npm:^2.0.50":
"node-releases@npm:^2.0.51":
version: 2.0.51
resolution: "node-releases@npm:2.0.51"
checksum: 10c0/6cf3fe1f9eabe02ce6de67e9db77b73edc9f5625003791e1f8f239f8e2a851450a5aeb1eff2cc43cfb26312e19b26bfe07626bf428479e6a76f56553fc6148da
@@ -11402,27 +11402,27 @@ __metadata:
languageName: node
linkType: hard
"playwright-core@npm:1.60.0":
version: 1.60.0
resolution: "playwright-core@npm:1.60.0"
"playwright-core@npm:1.61.1":
version: 1.61.1
resolution: "playwright-core@npm:1.61.1"
bin:
playwright-core: cli.js
checksum: 10c0/99ccd43923b6e9355e0723b7fe221e6326efd4687f8dafff951313662aea11db51f542a9c2122c704c445fb9baae1c9ec9fa6f895126bbddd9fe92313f6942c9
checksum: 10c0/c28896ba82a602182e240ed4f9c467fb0dd9cb57d510f8aba9f25183fe1cde3a0105725a29baffa4157fe885bbb11e228032a2aad0424111584fde45303f07bd
languageName: node
linkType: hard
"playwright@npm:^1.60.0":
version: 1.60.0
resolution: "playwright@npm:1.60.0"
"playwright@npm:^1.61.1":
version: 1.61.1
resolution: "playwright@npm:1.61.1"
dependencies:
fsevents: "npm:2.3.2"
playwright-core: "npm:1.60.0"
playwright-core: "npm:1.61.1"
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 10c0/714ad76d85b4865d7e43c0012f9039800c1485373388973ed39d79339cee5ad467052d1e2f1eaeca107a1cb6e65342186a8578a4c3504853d84c3a691250d5db
checksum: 10c0/cea1bc4d2a64ec3ef683891606774029da7b8a8036ed98332565cec2f8e89549ca1fab9a89fbfba4e08e27e0d7e7d148031e965af66d5ff97bb3c34058cfcad0
languageName: node
linkType: hard
@@ -11915,14 +11915,14 @@ __metadata:
languageName: node
linkType: hard
"postcss@npm:^8.0.0, postcss@npm:^8.4.35, postcss@npm:^8.5.13, postcss@npm:^8.5.16":
version: 8.5.16
resolution: "postcss@npm:8.5.16"
"postcss@npm:^8.0.0, postcss@npm:^8.4.35, postcss@npm:^8.5.13, postcss@npm:^8.5.17":
version: 8.5.19
resolution: "postcss@npm:8.5.19"
dependencies:
nanoid: "npm:^3.3.12"
picocolors: "npm:^1.1.1"
source-map-js: "npm:^1.2.1"
checksum: 10c0/625de7a02f662f3a340964d14b487bd5097adf16f5f171e257d19005ba37aea8768ee446557500e88e91ca46b4d14d6cb4a0bf033c6ec0c8c0b660d85719f1ef
checksum: 10c0/302af9e4dfa8cce4f43af1798576b3a77ab7b23abac5522328c6c7a830d49b31281cba9d6071e478e6970a05ef82346d1570b8fbffae912f26a4f1a1a07f0a44
languageName: node
linkType: hard
@@ -12198,16 +12198,16 @@ __metadata:
linkType: hard
"react-intl@npm:^10.0.0":
version: 10.1.16
resolution: "react-intl@npm:10.1.16"
version: 10.1.18
resolution: "react-intl@npm:10.1.18"
dependencies:
"@formatjs/icu-messageformat-parser": "npm:3.5.14"
"@formatjs/intl": "npm:4.1.16"
intl-messageformat: "npm:11.2.11"
"@formatjs/icu-messageformat-parser": "npm:3.5.15"
"@formatjs/intl": "npm:4.1.17"
intl-messageformat: "npm:11.2.12"
peerDependencies:
"@types/react": ">=18.0.0"
react: ">=18.0.0"
checksum: 10c0/2456747fb846b61efe43b9936e0b13a84ac33cd2785d273dc89b28e4c6a25c5e727c0b73916bd5f8c5620d27ed9de9a03492fe5735dc329fe239991a4b931eef
checksum: 10c0/6f9a4dc5628aa63f3e84c73078b279c1e04925fb5ed72072f83648e4ee4d71cc6cc7af151976d7191ac21e30d9cbef543a96211a6f7de1de762832fd43f64e30
languageName: node
linkType: hard
@@ -12710,7 +12710,7 @@ __metadata:
languageName: node
linkType: hard
"rolldown@npm:~1.1.4":
"rolldown@npm:~1.1.5":
version: 1.1.5
resolution: "rolldown@npm:1.1.5"
dependencies:
@@ -14731,14 +14731,14 @@ __metadata:
linkType: hard
"vite@npm:^6.0.0 || ^7.0.0 || ^8.0.0, vite@npm:^8.0.0":
version: 8.1.4
resolution: "vite@npm:8.1.4"
version: 8.1.5
resolution: "vite@npm:8.1.5"
dependencies:
fsevents: "npm:~2.3.3"
lightningcss: "npm:^1.32.0"
picomatch: "npm:^4.0.5"
postcss: "npm:^8.5.16"
rolldown: "npm:~1.1.4"
postcss: "npm:^8.5.17"
rolldown: "npm:~1.1.5"
tinyglobby: "npm:^0.2.17"
peerDependencies:
"@types/node": ^20.19.0 || >=22.12.0
@@ -14783,7 +14783,7 @@ __metadata:
optional: true
bin:
vite: bin/vite.js
checksum: 10c0/4262cdd0dd00ca99b00a8aef91fc00e58b66e80b54adbef49353bfbbae7342c2d6ddf1180351956086ff53ad186bec03784f57b96e36ab4dad1246547236d79b
checksum: 10c0/3231e24dd4394d0bc8b4f0f5d6d6a2eda8737e5053042892b4163564456a03d67f953c4c7498621f9517eebc30a492ea136c728a767a122eb84bf6d7cf60e1e6
languageName: node
linkType: hard