Skip to content

Commit

Permalink
enhance 24b3750
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Jan 1, 2025
1 parent 4d60782 commit 1f4ae7e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 57 deletions.
14 changes: 4 additions & 10 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3172,14 +3172,8 @@ _getQRCode:
description: "Can scan or share the QR code below."
_searchSite:
title: "Search Engine"
description: "Change search engine that used in search MFM."
google: "Google"
bing: "Bing"
yahoo: "Yahoo"
baidu: "Baidu"
naver: "NAVER"
duckduckgo: "DuckDuckGo"
other: "Other"
otherDescription: "Use Other search engine"
description: "Change search engine that used in search MFC."
otherSearchEngine: "Other search engines"
otherDescription: "Use other search engine"
query: "Query"
queryDescription: "Input query scheme for search engine. For example, If https://www.ecosia.org/search?q=test, input 'q'."
queryDescription: "Input query scheme for search engine. For example, if https://www.google.com/search?q=test, input 'q'."
32 changes: 2 additions & 30 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12368,37 +12368,9 @@ export interface Locale extends ILocale {
*/
"title": string;
/**
* MFMの検索構文で検索できるサイトを変更します
* MFCの検索構文で検索できるサイトを変更します
*/
"description": string;
/**
* Google
*/
"google": string;
/**
* Bing
*/
"bing": string;
/**
* Yahoo
*/
"yahoo": string;
/**
* Baidu
*/
"baidu": string;
/**
* NAVER
*/
"naver": string;
/**
* DuckDuckGo
*/
"duckduckgo": string;
/**
* その他
*/
"other": string;
/**
* その他の検索エンジン
*/
Expand All @@ -12412,7 +12384,7 @@ export interface Locale extends ILocale {
*/
"query": string;
/**
* 検索エンジンが使用するクエリを入力します。(例: https://www.ecosia.org/search?q=test の場合qを入れる)
* 検索エンジンが使用するクエリを入力します。(例: https://www.google.com/search?q=test の場合qを入れる)
*/
"queryDescription": string;
};
Expand Down
11 changes: 2 additions & 9 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3300,15 +3300,8 @@ _getQRCode:

_searchSite:
title: "検索エンジン"
description: "MFMの検索構文で検索できるサイトを変更します。"
google: "Google"
bing: "Bing"
yahoo: "Yahoo"
baidu: "Baidu"
naver: "NAVER"
duckduckgo: "DuckDuckGo"
other: "その他"
description: "MFCの検索構文で検索できるサイトを変更します。"
otherSearchEngine: "その他の検索エンジン"
otherDescription: "その他の検索エンジンを使用します。"
query: "検索クエリ"
queryDescription: "検索エンジンが使用するクエリを入力します。(例: https://www.ecosia.org/search?q=test の場合qを入れる)"
queryDescription: "検索エンジンが使用するクエリを入力します。(例: https://www.google.com/search?q=test の場合qを入れる)"
7 changes: 7 additions & 0 deletions locales/ko-KR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3177,3 +3177,10 @@ _scheduledNoteDelete:
_getQRCode:
title: "QR 코드 스캔하기"
description: "아래 QR 코드를 스캔하거나 공유할 수 있어요."
_searchSite:
title: "검색 엔진"
description: "MFC의 검색 구문을 사용했을 때 사용되는 검색 엔진을 변경해요."
otherSearchEngine: "사용자 지정 검색 엔진"
otherDescription: "검색 엔진을 직접 지정할 수 있어요."
query: "검색 쿼리"
queryDescription: "검색 엔진이 사용할 쿼리를 입력해 주세요. (예: https://www.google.com/search?q=test 의 경우 q를 입력)"
4 changes: 4 additions & 0 deletions packages/frontend/src/components/MkGoogle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const search = () => {
sp.append('query', query.value);
url = `https://search.naver.com/search.naver?${sp.toString()}`;
break;
case 'daum':
sp.append('q', query.value);
url = `https://search.daum.net/search?${sp.toString()}`;
break;
case 'duckduckgo':
sp.append('q', query.value);
url = `https://duckduckgo.com/?${sp.toString()}`;
Expand Down
15 changes: 8 additions & 7 deletions packages/frontend/src/pages/settings/general.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSelect v-model="searchEngine">
<template #label>{{ i18n.ts._searchSite.title }}</template>
<template #caption>{{ i18n.ts._searchSite.description }}</template>
<option value="google">{{ i18n.ts._searchSite.google }}</option>
<option value="bing">{{ i18n.ts._searchSite.bing }}</option>
<option value="yahoo">{{ i18n.ts._searchSite.yahoo }}</option>
<option value="baidu">{{ i18n.ts._searchSite.baidu }}</option>
<option value="naver">{{ i18n.ts._searchSite.naver }}</option>
<option value="duckduckgo">{{ i18n.ts._searchSite.duckduckgo }}</option>
<option value="other">{{ i18n.ts._searchSite.other }}</option>
<option value="google">Google</option>
<option value="bing">Bing</option>
<option value="yahoo">Yahoo</option>
<option value="baidu">Baidu</option>
<option value="naver">NAVER</option>
<option value="daum">Daum</option>
<option value="duckduckgo">DuckDuckGo</option>
<option value="other">{{ i18n.ts.other }}</option>
</MkSelect>
<MkInput v-if="defaultStore.state.searchEngine == 'other'" v-model="searchEngineUrl">
<template #label>{{ i18n.ts._searchSite.otherSearchEngine }}</template>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export const defaultStore = markRaw(new Storage('base', {
},
searchEngine: {
where: 'device',
default: 'google' as 'google' | 'bing' | 'yahoo' | 'baidu'| 'naver' | 'duckduckgo' | 'other',
default: 'google' as 'google' | 'bing' | 'yahoo' | 'baidu' | 'naver' | 'daum' | 'duckduckgo' | 'other',
},
searchEngineUrl: {
where: 'device',
Expand Down

0 comments on commit 1f4ae7e

Please sign in to comment.