From 0f1bc757d6196930e3f6edaa459890ae49c739e5 Mon Sep 17 00:00:00 2001 From: CosmoX Date: Fri, 3 Jul 2026 15:32:20 -0700 Subject: [PATCH] Rename Gist UI copy to Snippet (#647) --- README.md | 7 ++-- .../navigationPanelDetails/index.js | 2 +- app/containers/snippet/index.js | 4 +-- app/containers/snippetPanel/index.js | 2 +- app/index.js | 2 +- app/utilities/i18n/locales/en.js | 32 +++++++++---------- app/utilities/i18n/locales/es.js | 32 +++++++++---------- app/utilities/i18n/locales/fr.js | 32 +++++++++---------- app/utilities/i18n/locales/ja.js | 32 +++++++++---------- app/utilities/i18n/locales/ko.js | 32 +++++++++---------- app/utilities/i18n/locales/tr.js | 32 +++++++++---------- app/utilities/i18n/locales/zh-Hans.js | 32 +++++++++---------- app/utilities/i18n/locales/zh-Hant.js | 32 +++++++++---------- tests/smoke/electron-render-smoke.js | 2 +- tests/utilities/i18n.test.js | 28 ++++++++++++++++ wiki/configuration.md | 6 ++-- wiki/faq.md | 6 ++-- 17 files changed, 171 insertions(+), 144 deletions(-) diff --git a/README.md b/README.md index 3ba0ba9f..04e62506 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ | Edit Snippet | `Cmd/Ctrl + E` | Edit a snippet | | Delete Snippet | `Cmd/Ctrl + Del` | Delete selected snippet | | Submit | `Cmd/Ctrl + S` | Submit the changes from the editor | -| Sync | `Cmd/Ctrl + R` | Sync with remote Gist server | +| Sync | `Cmd/Ctrl + R` | Sync snippets with GitHub Gist | | Immersive Mode | `Cmd/Ctrl + I` | Toggle the [Immersive mode](https://github.com/hackjutsu/Lepton/blob/master/docs/img/portfolio/immersive.png) | | Dashboard | `Cmd/Ctrl + D` | Toggle the [dashboard](https://github.com/hackjutsu/Lepton/blob/master/docs/img/portfolio/dashboard.png) | | About Page | `Cmd/Ctrl + ,` | Toggle the [About page](https://github.com/hackjutsu/Lepton/blob/dev/docs/img/portfolio/about.png) | @@ -60,7 +60,6 @@ Lepton's can be customized by `/.leptonrc`! You can find its exact pat - Theme (`light`, `dark`, `one-dark`, `atom-one-dark`, `github-light`, `github-dark`, `catppuccin-latte`, `catppuccin-mocha`, `solarized-light`, `solarized-dark`, `dracula`, `material-theme`, or `ayu`) - Snippet -- Gist - Editor - Logger - Proxy @@ -220,7 +219,7 @@ $ LEPTON_RENDER_FIXTURE=active npm start ``` Fixtures verify that important React surfaces mount without renderer warnings, -errors, failed loads, or crashes. They do not verify GitHub OAuth, Gist CRUD, +errors, failed loads, or crashes. They do not verify GitHub OAuth, snippet CRUD, sync behavior, real API responses, OS shortcut delivery, or full interaction flows. @@ -244,7 +243,7 @@ $ npm run build && npm start Confirm the login page visibly renders. After login, manually verify the surfaces affected by your change, such as new snippet, edit snippet, -settings/about, dashboard, search, sync, and GitHub/Gist backend interactions. +settings/about, dashboard, search, sync, and GitHub Gist backend interactions. Manual verification is still required for visual quality and real GitHub behavior; automated smoke checks do not replace backend workflow testing. diff --git a/app/containers/navigationPanelDetails/index.js b/app/containers/navigationPanelDetails/index.js index eacdcc05..6093a480 100644 --- a/app/containers/navigationPanelDetails/index.js +++ b/app/containers/navigationPanelDetails/index.js @@ -47,7 +47,7 @@ class NavigationPanelDetails extends Component { handleClicked (gistId) { const { gists, fetchSingleGist, selectGist } = this.props - logger.info('A new gist is selected: ' + gistId) + logger.info('A new snippet is selected: ' + gistId) if (!gists[gistId].details) { logger.info('[Dispatch] fetchSingleGist ' + gistId) fetchSingleGist(gists[gistId], gistId) diff --git a/app/containers/snippet/index.js b/app/containers/snippet/index.js index 254046c9..ec3214e1 100755 --- a/app/containers/snippet/index.js +++ b/app/containers/snippet/index.js @@ -88,12 +88,12 @@ class Snippet extends Component { accessToken, activeGist) .catch(err => { - logger.error('Failed to delete the gist ' + activeGist) + logger.error('Failed to delete the snippet ' + activeGist) logger.error(JSON.stringify(err)) notifyFailure(t('notification.deletionFailed'), t('notification.networkFailure', { code: '02' })) }) .then(data => { - logger.info('The gist ' + activeGist + ' has been deleted.') + logger.info('The snippet ' + activeGist + ' has been deleted.') notifySuccess(t('notification.gistDeleted')) // For performance purpose, we should perform an internal update, like what diff --git a/app/containers/snippetPanel/index.js b/app/containers/snippetPanel/index.js index 3eb634a0..f4c46e64 100644 --- a/app/containers/snippetPanel/index.js +++ b/app/containers/snippetPanel/index.js @@ -18,7 +18,7 @@ class SnippetPanel extends Component { renderEmptySnippetSection () { return ( -
{ emptyStateDinosaur }
+
{ emptyStateDinosaur }
) } diff --git a/app/index.js b/app/index.js index e28b1dee..cacfd3f0 100644 --- a/app/index.js +++ b/app/index.js @@ -387,7 +387,7 @@ function downloadGistDetailsAfterListSync (gistList, token) { let downloaded = 0 updateSnippetDownloadStatus(downloaded, total) - logger.info(`[sync] Downloading details for ${total} gists`) + logger.info(`[sync] Downloading details for ${total} snippets`) return Promise.map(gistList, gist => { return getGitHubApi(GET_SINGLE_GIST)(token, gist.id) .then(details => { diff --git a/app/utilities/i18n/locales/en.js b/app/utilities/i18n/locales/en.js index 6f38efe5..fb0bba31 100644 --- a/app/utilities/i18n/locales/en.js +++ b/app/utilities/i18n/locales/en.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}} Master!', complimentPrefix: 'Well done! You are on the road to', mysteriousLanguage: 'Hmm... Looks like you are learning a mysterious language.', - notEnoughData: 'Not enough data. Try creating gists of more than two languages. Happy Coding!', + notEnoughData: 'Not enough data. Try creating snippets of more than two languages. Happy Coding!', statsLabel: 'My Language Stats', title: 'Dashboard' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: 'Bring All to Front', close: 'Close', dashboard: 'Dashboard', - deleteGist: 'Delete Gist', + deleteGist: 'Delete Snippet', edit: 'Edit', - editGist: 'Edit Gist', + editGist: 'Edit Snippet', exitEditor: 'Exit Editor', - gist: 'Gist', + gist: 'Snippet', immersiveMode: 'Immersive Mode', learnMore: 'Learn More', minimize: 'Minimize', - newGist: 'New Gist', + newGist: 'New Snippet', openLeptonWindow: 'Open Lepton window', openWindow: 'Open Window', quit: 'Quit', quitLepton: 'Quit Lepton', search: 'Search', speech: 'Speech', - submitGist: 'Submit Gist', - syncGist: 'Sync Gist', + submitGist: 'Submit Snippet', + syncGist: 'Sync Snippet', toggleDeveloperTools: 'Toggle Developer Tools', view: 'View', zoom: 'Zoom' @@ -97,11 +97,11 @@ module.exports = { contentCopied: 'The content has been copied to the clipboard.', copied: 'Copied', deletionFailed: 'Deletion failed', - gistCreated: 'Gist created', - gistCreationFailed: 'Gist creation failed', - gistDeleted: 'The gist has been deleted', - gistUpdateFailed: 'Gist update failed', - gistUpdated: 'Gist updated', + gistCreated: 'Snippet created', + gistCreationFailed: 'Snippet creation failed', + gistDeleted: 'The snippet has been deleted', + gistUpdateFailed: 'Snippet update failed', + gistUpdated: 'Snippet updated', linkCopied: 'The link has been copied to the clipboard.', networkFailure: 'Please check your network condition. {{code}}', rawLinkCopied: 'The raw file link has been copied to the clipboard.', @@ -126,15 +126,15 @@ module.exports = { copy: 'COPY', delete: 'Delete', deleteAction: 'delete', - deleteConfirmTitle: 'Delete the gist?', + deleteConfirmTitle: 'Delete the snippet?', edit: 'Edit', lastActive: 'Last active {{time}}', link: 'LINK', openInWeb: 'Open in Web', - publicGist: 'public gist', + publicGist: 'public snippet', raw: 'RAW', revisions: 'Revisions', - secretGist: 'secret gist', + secretGist: 'secret snippet', share: 'SHARE' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: 'Sync' }, welcome: { - emptySnippet: 'Click #new on the left panel to create a gist.' + emptySnippet: 'Click #new on the left panel to create a snippet.' } } diff --git a/app/utilities/i18n/locales/es.js b/app/utilities/i18n/locales/es.js index 590663fe..7d2e23e6 100644 --- a/app/utilities/i18n/locales/es.js +++ b/app/utilities/i18n/locales/es.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: 'Maestro de {{language}}!', complimentPrefix: 'Bien hecho! Vas camino a ser', mysteriousLanguage: 'Hmm... Parece que estas aprendiendo un lenguaje misterioso.', - notEnoughData: 'No hay suficientes datos. Prueba crear gists de mas de dos lenguajes. Happy Coding!', + notEnoughData: 'No hay suficientes datos. Prueba crear snippets de mas de dos lenguajes. Happy Coding!', statsLabel: 'Mis estadisticas de lenguajes', title: 'Panel' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: 'Traer todo al frente', close: 'Cerrar', dashboard: 'Panel', - deleteGist: 'Eliminar Gist', + deleteGist: 'Eliminar snippet', edit: 'Editar', - editGist: 'Editar Gist', + editGist: 'Editar snippet', exitEditor: 'Salir del editor', - gist: 'Gist', + gist: 'Snippet', immersiveMode: 'Modo inmersivo', learnMore: 'Mas informacion', minimize: 'Minimizar', - newGist: 'Nuevo Gist', + newGist: 'Nuevo snippet', openLeptonWindow: 'Abrir ventana de Lepton', openWindow: 'Abrir ventana', quit: 'Salir', quitLepton: 'Salir de Lepton', search: 'Buscar', speech: 'Voz', - submitGist: 'Enviar Gist', - syncGist: 'Sincronizar Gist', + submitGist: 'Enviar snippet', + syncGist: 'Sincronizar snippet', toggleDeveloperTools: 'Alternar herramientas de desarrollo', view: 'Ver', zoom: 'Zoom' @@ -97,11 +97,11 @@ module.exports = { contentCopied: 'El contenido se copio al portapapeles.', copied: 'Copiado', deletionFailed: 'No se pudo eliminar', - gistCreated: 'Gist creado', - gistCreationFailed: 'No se pudo crear el Gist', - gistDeleted: 'El Gist se elimino', - gistUpdateFailed: 'No se pudo actualizar el Gist', - gistUpdated: 'Gist actualizado', + gistCreated: 'Snippet creado', + gistCreationFailed: 'No se pudo crear el snippet', + gistDeleted: 'El snippet se elimino', + gistUpdateFailed: 'No se pudo actualizar el snippet', + gistUpdated: 'Snippet actualizado', linkCopied: 'El enlace se copio al portapapeles.', networkFailure: 'Revisa tu conexion de red. {{code}}', rawLinkCopied: 'El enlace del archivo RAW se copio al portapapeles.', @@ -126,15 +126,15 @@ module.exports = { copy: 'COPIAR', delete: 'Eliminar', deleteAction: 'eliminar', - deleteConfirmTitle: 'Eliminar este Gist?', + deleteConfirmTitle: 'Eliminar este snippet?', edit: 'Editar', lastActive: 'Ultima actividad {{time}}', link: 'ENLACE', openInWeb: 'Abrir en la web', - publicGist: 'gist publico', + publicGist: 'snippet publico', raw: 'RAW', revisions: 'Revisiones', - secretGist: 'gist secreto', + secretGist: 'snippet secreto', share: 'COMPARTIR' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: 'Sincronizar' }, welcome: { - emptySnippet: 'Haz clic en #new en el panel izquierdo para crear un gist.' + emptySnippet: 'Haz clic en #new en el panel izquierdo para crear un snippet.' } } diff --git a/app/utilities/i18n/locales/fr.js b/app/utilities/i18n/locales/fr.js index 4c53c24d..038beeb2 100644 --- a/app/utilities/i18n/locales/fr.js +++ b/app/utilities/i18n/locales/fr.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: 'Maitre {{language}} !', complimentPrefix: 'Bien joue ! Vous etes en route vers', mysteriousLanguage: 'Hmm... On dirait que vous apprenez un langage mysterieux.', - notEnoughData: 'Pas assez de donnees. Creez des gists dans plus de deux langages. Happy Coding!', + notEnoughData: 'Pas assez de donnees. Creez des extraits dans plus de deux langages. Happy Coding!', statsLabel: 'Mes stats de langages', title: 'Tableau de bord' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: 'Tout ramener au premier plan', close: 'Fermer', dashboard: 'Tableau de bord', - deleteGist: 'Supprimer le Gist', + deleteGist: 'Supprimer l extrait', edit: 'Modifier', - editGist: 'Modifier le Gist', + editGist: 'Modifier l extrait', exitEditor: 'Quitter l editeur', - gist: 'Gist', + gist: 'Extrait', immersiveMode: 'Mode immersif', learnMore: 'En savoir plus', minimize: 'Reduire', - newGist: 'Nouveau Gist', + newGist: 'Nouvel extrait', openLeptonWindow: 'Ouvrir la fenetre Lepton', openWindow: 'Ouvrir la fenetre', quit: 'Quitter', quitLepton: 'Quitter Lepton', search: 'Rechercher', speech: 'Parole', - submitGist: 'Envoyer le Gist', - syncGist: 'Synchroniser le Gist', + submitGist: 'Envoyer l extrait', + syncGist: 'Synchroniser l extrait', toggleDeveloperTools: 'Basculer les outils de developpement', view: 'Affichage', zoom: 'Zoom' @@ -97,11 +97,11 @@ module.exports = { contentCopied: 'Le contenu a ete copie dans le presse-papiers.', copied: 'Copie', deletionFailed: 'Suppression echouee', - gistCreated: 'Gist cree', - gistCreationFailed: 'Creation du Gist echouee', - gistDeleted: 'Le gist a ete supprime', - gistUpdateFailed: 'Mise a jour du Gist echouee', - gistUpdated: 'Gist mis a jour', + gistCreated: 'Extrait cree', + gistCreationFailed: 'Creation de l extrait echouee', + gistDeleted: 'L extrait a ete supprime', + gistUpdateFailed: 'Mise a jour de l extrait echouee', + gistUpdated: 'Extrait mis a jour', linkCopied: 'Le lien a ete copie dans le presse-papiers.', networkFailure: 'Veuillez verifier votre connexion. {{code}}', rawLinkCopied: 'Le lien du fichier RAW a ete copie dans le presse-papiers.', @@ -126,15 +126,15 @@ module.exports = { copy: 'COPIER', delete: 'Supprimer', deleteAction: 'supprimer', - deleteConfirmTitle: 'Supprimer ce gist ?', + deleteConfirmTitle: 'Supprimer cet extrait ?', edit: 'Modifier', lastActive: 'Derniere activite {{time}}', link: 'LIEN', openInWeb: 'Ouvrir dans le web', - publicGist: 'gist public', + publicGist: 'extrait public', raw: 'RAW', revisions: 'Historique', - secretGist: 'gist secret', + secretGist: 'extrait secret', share: 'PARTAGER' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: 'Synchroniser' }, welcome: { - emptySnippet: 'Cliquez sur #new dans le panneau gauche pour creer un gist.' + emptySnippet: 'Cliquez sur #new dans le panneau gauche pour creer un extrait.' } } diff --git a/app/utilities/i18n/locales/ja.js b/app/utilities/i18n/locales/ja.js index 302f2c46..f5000c56 100644 --- a/app/utilities/i18n/locales/ja.js +++ b/app/utilities/i18n/locales/ja.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}}マスター!', complimentPrefix: 'すばらしいです!あなたは次を目指しています', mysteriousLanguage: 'うーん... 謎めいた言語を学んでいるようです。', - notEnoughData: 'データが不足しています。3種類以上の言語でGistを作成してみてください。Happy Coding!', + notEnoughData: 'データが不足しています。3種類以上の言語でスニペットを作成してみてください。Happy Coding!', statsLabel: '言語統計', title: 'ダッシュボード' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: 'すべてを前面に表示', close: '閉じる', dashboard: 'ダッシュボード', - deleteGist: 'Gistを削除', + deleteGist: 'スニペットを削除', edit: '編集', - editGist: 'Gistを編集', + editGist: 'スニペットを編集', exitEditor: 'エディターを終了', - gist: 'Gist', + gist: 'スニペット', immersiveMode: '集中モード', learnMore: '詳しく見る', minimize: '最小化', - newGist: '新規Gist', + newGist: '新規スニペット', openLeptonWindow: 'Leptonウィンドウを開く', openWindow: 'ウィンドウを開く', quit: '終了', quitLepton: 'Leptonを終了', search: '検索', speech: 'スピーチ', - submitGist: 'Gistを送信', - syncGist: 'Gistを同期', + submitGist: 'スニペットを送信', + syncGist: 'スニペットを同期', toggleDeveloperTools: '開発者ツールを切り替え', view: '表示', zoom: 'ズーム' @@ -97,11 +97,11 @@ module.exports = { contentCopied: '内容をクリップボードにコピーしました。', copied: 'コピーしました', deletionFailed: '削除に失敗しました', - gistCreated: 'Gistを作成しました', - gistCreationFailed: 'Gistの作成に失敗しました', - gistDeleted: 'Gistを削除しました', - gistUpdateFailed: 'Gistの更新に失敗しました', - gistUpdated: 'Gistを更新しました', + gistCreated: 'スニペットを作成しました', + gistCreationFailed: 'スニペットの作成に失敗しました', + gistDeleted: 'スニペットを削除しました', + gistUpdateFailed: 'スニペットの更新に失敗しました', + gistUpdated: 'スニペットを更新しました', linkCopied: 'リンクをクリップボードにコピーしました。', networkFailure: 'ネットワーク状態を確認してください。{{code}}', rawLinkCopied: 'RAWファイルのリンクをクリップボードにコピーしました。', @@ -126,15 +126,15 @@ module.exports = { copy: 'コピー', delete: '削除', deleteAction: '削除', - deleteConfirmTitle: 'このGistを削除しますか?', + deleteConfirmTitle: 'このスニペットを削除しますか?', edit: '編集', lastActive: '最終更新 {{time}}', link: 'リンク', openInWeb: 'Webで開く', - publicGist: '公開Gist', + publicGist: '公開スニペット', raw: 'RAW', revisions: '履歴', - secretGist: 'シークレットGist', + secretGist: 'シークレットスニペット', share: '共有' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: '同期' }, welcome: { - emptySnippet: '左パネルの#newをクリックしてGistを作成してください。' + emptySnippet: '左パネルの#newをクリックしてスニペットを作成してください。' } } diff --git a/app/utilities/i18n/locales/ko.js b/app/utilities/i18n/locales/ko.js index 7a5c0ca8..cf088c9d 100644 --- a/app/utilities/i18n/locales/ko.js +++ b/app/utilities/i18n/locales/ko.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}} 마스터!', complimentPrefix: '좋아요! 이제', mysteriousLanguage: '흠... 신비한 언어를 배우고 있는 것 같아요.', - notEnoughData: '데이터가 부족합니다. 두 가지가 넘는 언어의 Gist를 만들어 보세요. Happy Coding!', + notEnoughData: '데이터가 부족합니다. 두 가지가 넘는 언어의 스니펫을 만들어 보세요. Happy Coding!', statsLabel: '내 언어 통계', title: '대시보드' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: '모두 앞으로 가져오기', close: '닫기', dashboard: '대시보드', - deleteGist: 'Gist 삭제', + deleteGist: '스니펫 삭제', edit: '편집', - editGist: 'Gist 편집', + editGist: '스니펫 편집', exitEditor: '편집기 종료', - gist: 'Gist', + gist: '스니펫', immersiveMode: '몰입 모드', learnMore: '자세히 보기', minimize: '최소화', - newGist: '새 Gist', + newGist: '새 스니펫', openLeptonWindow: 'Lepton 창 열기', openWindow: '창 열기', quit: '종료', quitLepton: 'Lepton 종료', search: '검색', speech: '말하기', - submitGist: 'Gist 제출', - syncGist: 'Gist 동기화', + submitGist: '스니펫 제출', + syncGist: '스니펫 동기화', toggleDeveloperTools: '개발자 도구 전환', view: '보기', zoom: '확대/축소' @@ -97,11 +97,11 @@ module.exports = { contentCopied: '내용이 클립보드에 복사되었습니다.', copied: '복사됨', deletionFailed: '삭제 실패', - gistCreated: 'Gist가 생성되었습니다', - gistCreationFailed: 'Gist 생성 실패', - gistDeleted: 'Gist가 삭제되었습니다', - gistUpdateFailed: 'Gist 업데이트 실패', - gistUpdated: 'Gist가 업데이트되었습니다', + gistCreated: '스니펫이 생성되었습니다', + gistCreationFailed: '스니펫 생성 실패', + gistDeleted: '스니펫이 삭제되었습니다', + gistUpdateFailed: '스니펫 업데이트 실패', + gistUpdated: '스니펫이 업데이트되었습니다', linkCopied: '링크가 클립보드에 복사되었습니다.', networkFailure: '네트워크 상태를 확인하세요. {{code}}', rawLinkCopied: 'RAW 파일 링크가 클립보드에 복사되었습니다.', @@ -126,15 +126,15 @@ module.exports = { copy: '복사', delete: '삭제', deleteAction: '삭제', - deleteConfirmTitle: '이 Gist를 삭제할까요?', + deleteConfirmTitle: '이 스니펫을 삭제할까요?', edit: '편집', lastActive: '마지막 활동 {{time}}', link: '링크', openInWeb: '웹에서 열기', - publicGist: '공개 gist', + publicGist: '공개 스니펫', raw: 'RAW', revisions: '수정 기록', - secretGist: '비공개 gist', + secretGist: '비공개 스니펫', share: '공유' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: '동기화' }, welcome: { - emptySnippet: '왼쪽 패널의 #new를 클릭해 Gist를 만드세요.' + emptySnippet: '왼쪽 패널의 #new를 클릭해 스니펫을 만드세요.' } } diff --git a/app/utilities/i18n/locales/tr.js b/app/utilities/i18n/locales/tr.js index bb83af55..2e9b9782 100644 --- a/app/utilities/i18n/locales/tr.js +++ b/app/utilities/i18n/locales/tr.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}} ustası!', complimentPrefix: 'Tebrikler! Şu yolda ilerliyorsunuz', mysteriousLanguage: 'Hmm... Gizemli bir dil öğreniyor gibisiniz.', - notEnoughData: 'Yeterli veri yok. İkiden fazla dilde gist oluşturarak deneyin. İyi kodlamalar!', + notEnoughData: 'Yeterli veri yok. İkiden fazla dilde kod parçası oluşturarak deneyin. İyi kodlamalar!', statsLabel: 'Dil istatistiklerim', title: 'Pano' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: 'Tümünü öne getir', close: 'Kapat', dashboard: 'Pano', - deleteGist: 'Gist sil', + deleteGist: 'Kod parçasını sil', edit: 'Düzenle', - editGist: 'Gist düzenle', + editGist: 'Kod parçasını düzenle', exitEditor: 'Düzenleyiciden çık', - gist: 'Gist', + gist: 'Kod parçası', immersiveMode: 'Odak modu', learnMore: 'Daha fazla bilgi', minimize: 'Küçült', - newGist: 'Yeni Gist', + newGist: 'Yeni kod parçası', openLeptonWindow: 'Lepton penceresini aç', openWindow: 'Pencereyi aç', quit: 'Çık', quitLepton: 'Lepton uygulamasından çık', search: 'Ara', speech: 'Konuşma', - submitGist: 'Gist gönder', - syncGist: 'Gist eşitle', + submitGist: 'Kod parçasını gönder', + syncGist: 'Kod parçasını eşitle', toggleDeveloperTools: 'Geliştirici araçlarını aç/kapat', view: 'Görünüm', zoom: 'Yakınlaştır' @@ -97,11 +97,11 @@ module.exports = { contentCopied: 'İçerik panoya kopyalandı.', copied: 'Kopyalandı', deletionFailed: 'Silme başarısız', - gistCreated: 'Gist oluşturuldu', - gistCreationFailed: 'Gist oluşturulamadı', - gistDeleted: 'Gist silindi', - gistUpdateFailed: 'Gist güncellenemedi', - gistUpdated: 'Gist güncellendi', + gistCreated: 'Kod parçası oluşturuldu', + gistCreationFailed: 'Kod parçası oluşturulamadı', + gistDeleted: 'Kod parçası silindi', + gistUpdateFailed: 'Kod parçası güncellenemedi', + gistUpdated: 'Kod parçası güncellendi', linkCopied: 'Bağlantı panoya kopyalandı.', networkFailure: 'Lütfen ağ bağlantınızı kontrol edin. {{code}}', rawLinkCopied: 'Ham dosya bağlantısı panoya kopyalandı.', @@ -126,15 +126,15 @@ module.exports = { copy: 'KOPYALA', delete: 'Sil', deleteAction: 'sil', - deleteConfirmTitle: 'Gist silinsin mi?', + deleteConfirmTitle: 'Kod parçası silinsin mi?', edit: 'Düzenle', lastActive: 'Son etkinlik {{time}}', link: 'BAĞLANTI', openInWeb: 'Web\'de aç', - publicGist: 'herkese açık gist', + publicGist: 'herkese açık kod parçası', raw: 'HAM', revisions: 'Revizyonlar', - secretGist: 'gizli gist', + secretGist: 'gizli kod parçası', share: 'PAYLAŞ' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: 'Eşitle' }, welcome: { - emptySnippet: 'Gist oluşturmak için sol panelde #yeni\'ye tıklayın.' + emptySnippet: 'Kod parçası oluşturmak için sol panelde #yeni\'ye tıklayın.' } } diff --git a/app/utilities/i18n/locales/zh-Hans.js b/app/utilities/i18n/locales/zh-Hans.js index 82b78a51..489eab65 100644 --- a/app/utilities/i18n/locales/zh-Hans.js +++ b/app/utilities/i18n/locales/zh-Hans.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}} 大师!', complimentPrefix: '做得好!你正在成为', mysteriousLanguage: '嗯... 看起来你正在学习一种神秘的语言。', - notEnoughData: '数据不足。请尝试创建超过两种语言的 Gist。Happy Coding!', + notEnoughData: '数据不足。请尝试创建超过两种语言的代码片段。Happy Coding!', statsLabel: '我的语言统计', title: '仪表盘' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: '全部置于前台', close: '关闭', dashboard: '仪表盘', - deleteGist: '删除 Gist', + deleteGist: '删除代码片段', edit: '编辑', - editGist: '编辑 Gist', + editGist: '编辑代码片段', exitEditor: '退出编辑器', - gist: 'Gist', + gist: '代码片段', immersiveMode: '沉浸模式', learnMore: '了解更多', minimize: '最小化', - newGist: '新建 Gist', + newGist: '新建代码片段', openLeptonWindow: '打开 Lepton 窗口', openWindow: '打开窗口', quit: '退出', quitLepton: '退出 Lepton', search: '搜索', speech: '语音', - submitGist: '提交 Gist', - syncGist: '同步 Gist', + submitGist: '提交代码片段', + syncGist: '同步代码片段', toggleDeveloperTools: '切换开发者工具', view: '视图', zoom: '缩放' @@ -97,11 +97,11 @@ module.exports = { contentCopied: '内容已复制到剪贴板。', copied: '已复制', deletionFailed: '删除失败', - gistCreated: 'Gist 已创建', - gistCreationFailed: 'Gist 创建失败', - gistDeleted: 'Gist 已删除', - gistUpdateFailed: 'Gist 更新失败', - gistUpdated: 'Gist 已更新', + gistCreated: '代码片段已创建', + gistCreationFailed: '代码片段创建失败', + gistDeleted: '代码片段已删除', + gistUpdateFailed: '代码片段更新失败', + gistUpdated: '代码片段已更新', linkCopied: '链接已复制到剪贴板。', networkFailure: '请检查网络连接。{{code}}', rawLinkCopied: 'RAW 文件链接已复制到剪贴板。', @@ -126,15 +126,15 @@ module.exports = { copy: '复制', delete: '删除', deleteAction: '删除', - deleteConfirmTitle: '删除这个 Gist?', + deleteConfirmTitle: '删除这个代码片段?', edit: '编辑', lastActive: '最后活跃 {{time}}', link: '链接', openInWeb: '在网页中打开', - publicGist: '公开 gist', + publicGist: '公开代码片段', raw: 'RAW', revisions: '修订记录', - secretGist: '私密 gist', + secretGist: '私密代码片段', share: '分享' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: '同步' }, welcome: { - emptySnippet: '点击左侧面板中的 #new 来创建 Gist。' + emptySnippet: '点击左侧面板中的 #new 来创建代码片段。' } } diff --git a/app/utilities/i18n/locales/zh-Hant.js b/app/utilities/i18n/locales/zh-Hant.js index 3b9c441e..fac35bce 100644 --- a/app/utilities/i18n/locales/zh-Hant.js +++ b/app/utilities/i18n/locales/zh-Hant.js @@ -16,7 +16,7 @@ module.exports = { complimentMaster: '{{language}} 大師!', complimentPrefix: '做得好!你正在成為', mysteriousLanguage: '嗯... 看起來你正在學習一種神祕的語言。', - notEnoughData: '資料不足。請嘗試建立超過兩種語言的 Gist。Happy Coding!', + notEnoughData: '資料不足。請嘗試建立超過兩種語言的程式碼片段。Happy Coding!', statsLabel: '我的語言統計', title: '儀表板' }, @@ -63,23 +63,23 @@ module.exports = { bringAllToFront: '全部移到最前', close: '關閉', dashboard: '儀表板', - deleteGist: '刪除 Gist', + deleteGist: '刪除程式碼片段', edit: '編輯', - editGist: '編輯 Gist', + editGist: '編輯程式碼片段', exitEditor: '離開編輯器', - gist: 'Gist', + gist: '程式碼片段', immersiveMode: '沉浸模式', learnMore: '了解更多', minimize: '最小化', - newGist: '新增 Gist', + newGist: '新增程式碼片段', openLeptonWindow: '開啟 Lepton 視窗', openWindow: '開啟視窗', quit: '結束', quitLepton: '結束 Lepton', search: '搜尋', speech: '語音', - submitGist: '提交 Gist', - syncGist: '同步 Gist', + submitGist: '提交程式碼片段', + syncGist: '同步程式碼片段', toggleDeveloperTools: '切換開發者工具', view: '檢視', zoom: '縮放' @@ -97,11 +97,11 @@ module.exports = { contentCopied: '內容已複製到剪貼簿。', copied: '已複製', deletionFailed: '刪除失敗', - gistCreated: 'Gist 已建立', - gistCreationFailed: 'Gist 建立失敗', - gistDeleted: 'Gist 已刪除', - gistUpdateFailed: 'Gist 更新失敗', - gistUpdated: 'Gist 已更新', + gistCreated: '程式碼片段已建立', + gistCreationFailed: '程式碼片段建立失敗', + gistDeleted: '程式碼片段已刪除', + gistUpdateFailed: '程式碼片段更新失敗', + gistUpdated: '程式碼片段已更新', linkCopied: '連結已複製到剪貼簿。', networkFailure: '請檢查網路連線。{{code}}', rawLinkCopied: 'RAW 檔案連結已複製到剪貼簿。', @@ -126,15 +126,15 @@ module.exports = { copy: '複製', delete: '刪除', deleteAction: '刪除', - deleteConfirmTitle: '刪除此 Gist?', + deleteConfirmTitle: '刪除此程式碼片段?', edit: '編輯', lastActive: '最後活動 {{time}}', link: '連結', openInWeb: '在網頁中開啟', - publicGist: '公開 gist', + publicGist: '公開程式碼片段', raw: 'RAW', revisions: '修訂記錄', - secretGist: '私密 gist', + secretGist: '私密程式碼片段', share: '分享' }, touchBar: { @@ -158,6 +158,6 @@ module.exports = { sync: '同步' }, welcome: { - emptySnippet: '點擊左側面板中的 #new 來建立 Gist。' + emptySnippet: '點擊左側面板中的 #new 來建立程式碼片段。' } } diff --git a/tests/smoke/electron-render-smoke.js b/tests/smoke/electron-render-smoke.js index afc82477..e9e4cc15 100644 --- a/tests/smoke/electron-render-smoke.js +++ b/tests/smoke/electron-render-smoke.js @@ -71,7 +71,7 @@ const RENDER_FIXTURES = [ { name: 'delete', selector: '.modal-footer .btn-danger', - text: 'Delete the gist?' + text: 'Delete the snippet?' }, { name: 'raw', diff --git a/tests/utilities/i18n.test.js b/tests/utilities/i18n.test.js index 15719975..7f06aad6 100644 --- a/tests/utilities/i18n.test.js +++ b/tests/utilities/i18n.test.js @@ -37,6 +37,10 @@ const allowedIdenticalValues = new Set([ 'snippet.raw' ]) +const allowedGistTerminologyKeys = new Set([ + 'login.tokenPlaceholder' +]) + function flattenCatalog (catalog, prefix = '') { return Object.keys(catalog).reduce((flatCatalog, key) => { const path = prefix ? `${prefix}.${key}` : key @@ -97,6 +101,30 @@ describe('i18n utilities', () => { expect(t('login.continueAs', { username: 'octocat' })).toBe('Continue as octocat') }) + it('uses snippet terminology for English user-facing snippet actions', () => { + configureI18n('en') + + expect(t('menu.gist')).toBe('Snippet') + expect(t('menu.newGist')).toBe('New Snippet') + expect(t('menu.editGist')).toBe('Edit Snippet') + expect(t('menu.deleteGist')).toBe('Delete Snippet') + expect(t('menu.submitGist')).toBe('Submit Snippet') + expect(t('menu.syncGist')).toBe('Sync Snippet') + expect(t('notification.gistCreated')).toBe('Snippet created') + expect(t('snippet.deleteConfirmTitle')).toBe('Delete the snippet?') + }) + + it('keeps gist terminology out of user-facing locale copy except the GitHub scope', () => { + Object.entries(Object.assign({ en }, catalogs)).forEach(([locale, catalog]) => { + const offendingKeys = Object.entries(flattenCatalog(catalog)) + .filter(([key]) => !allowedGistTerminologyKeys.has(key)) + .filter(([, value]) => /\bgists?\b/i.test(String(value))) + .map(([key]) => `${locale}.${key}`) + + expect(offendingKeys).toEqual([]) + }) + }) + it('translates a specific locale without changing the active locale', () => { configureI18n('en') expect(translate('ja', 'login.title')).toBe('ログイン') diff --git a/wiki/configuration.md b/wiki/configuration.md index fe5088e9..89880ee6 100644 --- a/wiki/configuration.md +++ b/wiki/configuration.md @@ -97,12 +97,12 @@ The file is not generated automatically. Create it if you want to override the d | `snippet` | `sorting` | `updated_at` | Snippet order. Supported values: `updated_at`, `created_at`, `description`. | | | `sortingReverse` | `true` | Reverse the configured snippet order. | | | `expanded` | `true` | Expand snippets in the detail view by default. | -| | `newSnippetPrivate` | `false` | Create new snippets as secret gists by default. | +| | `newSnippetPrivate` | `false` | Create new snippets as secret snippets by default. | | | `downloadAll` | `false` | Load all authenticated snippets and download their details during sync. Enable this for complete global content search across snippet file contents. | | `tag` | `showInSnippetList` | `false` | Show custom tags in snippet list rows. | | | `colored` | `false` | Render custom tags with stable color badges. | | `editor` | `tabSize` | `4` | Tab size in spaces. | -| | `validateFilename` | `true` | Validate gist filenames before saving. | +| | `validateFilename` | `true` | Validate snippet filenames before saving. | | `enterprise` | `enable` | `false` | Enable GitHub Enterprise mode. | | | `host` | `""` | GitHub Enterprise host, for example `github.example.com`. | | | `token` | `""` | Personal access token with the `gist` scope. This remains plain `.leptonrc` configuration and is not affected by `security.cachedAccessTokenStorage`. | @@ -118,7 +118,7 @@ The file is not generated automatically. Create it if you want to override the d | | `keyImmersiveMode` | `CommandOrControl+I` | Toggle immersive mode. | | | `keyAboutPage` | `CommandOrControl+,` | Open the About page. | | | `keyDashboard` | `CommandOrControl+D` | Open the dashboard. | -| | `keySyncGists` | `CommandOrControl+R` | Sync with GitHub Gist. | +| | `keySyncGists` | `CommandOrControl+R` | Sync snippets with GitHub Gist. | ## Debug Logging diff --git a/wiki/faq.md b/wiki/faq.md index 83308994..6eed2efb 100644 --- a/wiki/faq.md +++ b/wiki/faq.md @@ -21,7 +21,7 @@ Lepton can search these fields: - language - description - tag -- gist id +- snippet id - downloaded snippet file content Complete global content search across every snippet requires the @@ -33,7 +33,7 @@ See [Configuration](configuration.md#options) for the `snippet.downloadAll` opti ## Title And Tags -Use this pattern in the gist description to set a title and custom tags: +Use this pattern in the snippet description to set a title and custom tags: ```text [title] description #tag1 #tag2 @@ -113,7 +113,7 @@ Lepton requires the `gist` scope. ## About Data Collection -Lepton is a desktop GitHub Gist client and does not run its own sync service. Data is stored locally by the app or remotely in GitHub Gist. +Lepton is a desktop snippet client backed by GitHub Gist and does not run its own sync service. Data is stored locally by the app or remotely in GitHub Gist. ## Donation