Skip to content

Commit

Permalink
Merge branch 'main' into 956-download-resources
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/extension-host/data/menu.data.json
  • Loading branch information
rolfheij-sil committed Nov 12, 2024
2 parents 7286b37 + 1a164e5 commit b6a0122
Show file tree
Hide file tree
Showing 73 changed files with 962 additions and 932 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ module.exports = {

// #region ERB rules

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: Install packages
run: npm ci

- name: type checking
run: npm run typecheck

- name: Build
run: npm run build

Expand Down
7 changes: 5 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo "Running Lint check..."

echo "Lint checking..."
# generate papi.d.ts as part of lint:staged
npm run lint:staged
echo "Lint check finished"

echo "Type checking..."
npm run typecheck
echo "Type check finished"

echo "If the following fails run npm run editor:unlink"
npx yalc check
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"javascript.validate.enable": false,
"javascript.format.enable": false,
"typescript.format.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",

"search.exclude": {
".git": true,
Expand Down
57 changes: 40 additions & 17 deletions assets/localization/en.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,60 @@
{
"%product_name%": "Platform.Bible",
"%about_versionLabel_format%": "Version: {version}",
"%about_licenseLabel_format%": "License: {license}",
"%downloadUpdateProjectTab_aria_downloadable%": "downloadable projects",
"%downloadUpdateProjectTab_aria_downloaded%": "downloaded projects",
"%downloadUpdateProjectTab_button_delete%": "Delete",
"%downloadUpdateProjectTab_listHeader_downloadable%": "Downloadable Projects",
"%downloadUpdateProjectTab_listHeader_downloaded%": "Downloaded Projects",
"%downloadUpdateProjectTab_title_downloadUpdate%": "Download/Update Project",
"%general_button_submit%": "Submit",
"%general_cancel%": "Cancel",
"%insertNote%": "Insert Note",
"%general_error_title%": "Error",
"%mainMenu_about%": "About Platform.Bible",
"%mainMenu_downloadSlashInstallResources%": "Download/Install Resources",
"%mainMenu_downloadSlashUpdateProject%": "Download/Update Project",
"%mainMenu_exit%": "Exit",
"%general_loading%": "Loading",
"%general_run%": "Run",
"%mainMenu_help%": "Help",
"%mainMenu_layout%": "Layout",
"%mainMenu_about%": "About Platform.Bible",
"%mainMenu_downloadInstallResources%": "Download/Install Resources",
"%mainMenu_exit%": "Exit",
"%mainMenu_openProject%": "Open Project",
"%mainMenu_project%": "Project",
"%mainMenu_settings%": "Settings",
"%mainMenu_visitSupportBible%": "Visit Support.Bible",
"%mainMenu_project%": "Project",
"%mainMenu_window%": "Window",
"%some_localization_key%": "This is the English text for %some_localization_key%.",
"%menuItemName_wordList%": "Word List",
"%product_name%": "Platform.Bible",
"%project_full_name_missing%": "*Name Missing*",
"%project_language_missing%": "*Language Missing*",
"%project_name_missing%": "_NoName_",
"%project_settings_platform_group1_description%": "Project settings pertaining to the software overall",
"%project_settings_platform_fullName_label%": "Project Full Name",
"%project_settings_platform_group1_label%": "Platform Settings",
"%project_settings_platform_isEditable_label%": "Is Editable",
"%project_settings_platform_isEditable_description%": "Whether this project is editable. A project that is not editable is sometimes called a resource.",
"%project_settings_platform_language_label%": "Project Primary Language",
"%project_settings_platform_name_label%": "Project Short Name",
"%selectBooks_title_selectBooks%": "Select Books",
"%selectMultipleProjects_title_selectProjects%": "Select Projects",
"%selectProject_title%": "Select Project",
"%settings_defaultMessage_loadingSetting%": "Loading setting",
"%settings_defaultSearchText_searchProject%": "Search Project Settings...",
"%settings_defaultSearchText_searchUserSettings%": "Search User Settings...",
"%settings_title_projectSettings%": "Project Settings",
"%settings_title_userSettings%": "User Settings",
"%submitButton%": "Submit",
"%scrollGroup_undefined%": "Ø",
"%scrollGroup_0%": "A",
"%scrollGroup_1%": "B",
"%scrollGroup_2%": "C",
"%scrollGroup_3%": "D",
"%scrollGroup_4%": "E",
"%some_localization_key%": "This is the English text for %some_localization_key%.",
"%tab_aria_tab%": "Tab",
"%tab_title_error%": "Error",
"%tab_title_unknown%": "Unknown",
"%webView_defaultTitle_webView%": "Web View",
"%webView_edit%": "Edit",
"%webView_openProjectSettings%": "Open Project Settings",
"%webView_project%": "Project",
Expand All @@ -38,14 +70,5 @@
"%settings_platform_paratextDataLastRegistryDataCachedTimes_label%": "ParatextData Last Registry Data Cached Times",
"%settings_platform_comments_enabled_label%": "Comments enabled (experimental)",
"%settings_platform_comments_enabled_description%": "Enabled reading and writing comments in projects. This is an experimental feature.",
"%project_settings_platform_group1_label%": "Platform Settings",
"%project_settings_platform_group1_description%": "Project settings pertaining to the software overall",
"%project_settings_platform_name_label%": "Project Short Name",
"%project_name_missing%": "_NoName_",
"%project_settings_platform_fullName_label%": "Project Full Name",
"%project_full_name_missing%": "*Name Missing*",
"%project_language_missing%": "*Language Missing*",
"%project_settings_platform_language_label%": "Project Primary Language",
"%project_settings_platform_isEditable_label%": "Is Editable",
"%project_settings_platform_isEditable_description%": "Whether this project is editable. A project that is not editable is sometimes called a resource."
"%webView_title_type_formatString%": "{type} {defaultTitle}"
}
8 changes: 4 additions & 4 deletions assets/localization/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"%about_versionLabel_format%": "Versión: {version}",
"%about_licenseLabel_format%": "Licencia: {license}",
"%insertNote%": "Insertar Nota",
"%mainMenu_aboutPlatformBible%": "Acerca de Platform.Bible",
"%mainMenu_about%": "Acerca de Platform.Bible",
"%mainMenu_downloadSlashInstallResources%": "Descargar/instalar recursos",
"%mainMenu_downloadSlashUpdateProject%": "Descargar/actualizar proyecto",
"%mainMenu_exit%": "Salir",
Expand All @@ -20,8 +20,8 @@
"%webView_project%": "Proyecto",
"%webView_projectAssignmentsAndProgress%": "Asignaciones y progreso",
"%wordList%": "Lista de palabras",
"%settings_platform_group1_label%": "Configuraciones de Platform",
"%settings_platform_group1_description%": "Configuraciones generales del software fundamental",
"%settings_platform_interfaceLanguage_label%": "Idioma de interfaz",
"%settings_platform_interfaceLanguage_description%": "Lista de locales usados al localizar la interfaz en orden descendente de prioridad. 'en' (inglés) siempre se añade al final, de modo que si no se encuentra una traducción en ninguno de los idiomas especificados, aparecerá en inglés."
"%settings_platform_interfaceLanguage_description%": "Lista de locales usados al localizar la interfaz en orden descendente de prioridad. 'en' (inglés) siempre se añade al final, de modo que si no se encuentra una traducción en ninguno de los idiomas especificados, aparecerá en inglés.",
"%settings_platform_label_group1%": "Configuraciones de Platform",
"%settings_platform_interfaceLanguage_label%": "Idioma de interfaz"
}
2 changes: 1 addition & 1 deletion assets/localization/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"%some_localization_key%": "Ceci est le texte en français pour %some_localization_key%.",
"%submitButton%": "Soumettre",
"%general_button_submit%": "Soumettre",
"%Book.Gen%": "Genèse"
}
2 changes: 2 additions & 0 deletions extensions/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {

// #region ERB rules

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
1 change: 1 addition & 0 deletions extensions/src/c-sharp-provider-test/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare module 'c-sharp-provider-test' {
// @ts-ignore: TS2307 - Cannot find module '@papi/core' or its corresponding type declarations
import { IDataProvider, DataProviderDataType } from '@papi/core';

type TimeDataTypes = {
Expand Down
2 changes: 2 additions & 0 deletions extensions/src/hello-someone/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {

// #region ERB rules

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
3 changes: 2 additions & 1 deletion extensions/src/hello-someone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:scripts": "eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
"lint:styles": "stylelint **/*.{css,scss}",
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts"
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts",
"typecheck": "tsc -p ./tsconfig.json"
},
"browserslist": [],
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions extensions/src/hello-someone/src/types/hello-someone.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare module 'hello-someone' {
// @ts-ignore: TS2307 - Cannot find module '@papi/core' or its corresponding type declarations
import { IDataProvider, DataProviderDataType } from '@papi/core';

export type Person = {
Expand Down
2 changes: 2 additions & 0 deletions extensions/src/hello-world/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {

// #region ERB rules

// Use `noImplicitReturns` instead. See https://typescript-eslint.io/rules/consistent-return/.
'consistent-return': 'off',
'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
Expand Down
30 changes: 28 additions & 2 deletions extensions/src/hello-world/contributions/localizedStrings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,36 @@
"%mainMenu_openHelloWorldProject%": "Open Hello World Project",
"%mainMenu_createNewHelloWorldProject%": "Create New Hello World Project",
"%mainMenu_deleteHelloWorldProject%": "Delete Hello World Project",
"%helloWorld_webViewMenu_project%": "Project",
"%helloWorld_webViewMenu_view%": "View",
"%helloWorld_greetingLoading%": "Greeting loading",
"%helloWorld_delete%": "Delete",
"%helloWorld_frenchLocalizationSubmit%": "French localization of Submit Button",
"%helloWorld_helloWorld%": "Hello World",
"%helloWorld_listOfSelectedIds%": "List of Selected Project Id(s)",
"%helloWorld_logo%": "Hello World Logo",
"%helloWorld_none%": "None",
"%helloWorld_openResourceViewer%": "Open in Resource Viewer",
"%helloWorld_openScriptureEditor%": "Open in Scripture Editor",
"%helloWorld_option1%": "Option 1",
"%helloWorld_option2%": "Option 2",
"%helloWorld_react%": "React",
"%helloWorld_select_project%": "Select Project",
"%helloWorld_select_projects%": "Select Projects",
"%helloWorld_selected_project%": "Selected Project",
"%helloWorld_table_id%": "ID",
"%helloWorld_table_subtitle%": "Subtitle",
"%helloWorld_table_title%": "Title",
"%helloWorld_testMe%": "Test Me",
"%helloWorld_throw_test_exception%": "Throw test exception",
"%helloWorld_webViewMenu_deleteProject%": "Delete this Project",
"%helloWorld_webViewMenu_openViewer%": "Open Viewer",
"%helloWorld_webViewMenu_project%": "Project",
"%helloWorld_webViewMenu_view%": "View",
"%helloWorld_loadingLatest%": "Loading latest Scripture text...",
"%helloWorld_loadingVerse%": "Loading Verse",
"%helloWorld_selectProject_prompt%": "Please select a Scripture project for Hello World WebView: (Render",
"%helloWorld_selectProject_title%": "Select Hello World Project",
"%helloWorld_selectProjects_prompt%": "Please select one or more Scripture projects for Hello World WebView:",
"%helloWorld_selectProjects_title%": "Select List of Hello World Projects",
"%settings_hello_world_group1_label%": "Hello World Settings",
"%settings_hello_world_personName_label%": "Selected Person's Name on Hello World Web View",
"%project_settings_helloWorld_group1_label%": "Hello World Project Settings",
Expand Down
3 changes: 2 additions & 1 deletion extensions/src/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:scripts": "eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
"lint:styles": "stylelint **/*.{css,scss}",
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts"
"lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts",
"typecheck": "tsc -p ./tsconfig.json"
},
"browserslist": [],
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions extensions/src/hello-world/src/types/hello-world.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare module 'hello-world' {
// @ts-ignore: TS2307 - Cannot find module '@papi/core' or its corresponding type declarations
import type { DataProviderDataType, MandatoryProjectDataTypes } from '@papi/core';
import type { IBaseProjectDataProvider } from 'papi-shared-types';

Expand Down
Loading

0 comments on commit b6a0122

Please sign in to comment.