Skip to content

Commit

Permalink
Squashed 'extensions/src/platform-scripture/' changes from 4ff3c1ffc.…
Browse files Browse the repository at this point in the history
….1c7c788d3

1c7c788d3 Merge pull request #72 from paranext/displaydata-descriptions
aecc3d1e2 refactor: adjusted file structure for extension descriptions
dd9b330d1 update `@sillsdev/scripture` (#71)
0df9c948a feat: added `displayData.json` file for localization (#70)
37c5b8be7 fix: adjusted displayData.json to have localizedDisplayInfo field
f9eac9e86 feat: added displayData.json file for localization
ef6e90c5a Bump braces from 3.0.2 to 3.0.3 (#69)

git-subtree-dir: extensions/src/platform-scripture
git-subtree-split: 1c7c788d3817e01e09104e1d112495b3185d2cad
  • Loading branch information
irahopkinson committed Jul 2, 2024
1 parent e869311 commit d829c27
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 30 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ To make the process of customizing from the template as smooth as possible, we r
- Replace the description with your own description
- Update ownership information and other relevant fields as desired

- In `assets/displayData.json`:

- If your extension has an icon, update the `icon` value to point towards the icon file (for example: `assets/icon.svg`)
- Update the `en` entry of `localizedDisplayInfo` so that:

- `displayName` contains a human-readable name for your extension (i.e. `Your Extension Name`).
- `shortSummary` contains a short, few sentence summary of what your extension does.
- `description` points to a Markdown (`.md`) file containing the full description of your extension (similar to what you would put in a `README`).

- If your extension supports multiple languages, add another entry to `localizedDisplayInfo` by copying and pasting the `en` entry, changing `en` to the [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the language you want to support, and translating the `displayName`, `shortSummary`, and `description` fields appropriately. We recommend naming your description files `description-<language tag>.md`.

- In `LICENSE`:

- Adjust as desired (feel free to choose a different license)
Expand Down Expand Up @@ -71,7 +82,10 @@ The general file structure is as follows:
- `src/types/paranext-extension-template.d.ts` is this extension's types file that defines how other extensions can use this extension through the `papi`. It is copied into the build folder
- `*.web-view.tsx` files will be treated as React WebViews
- `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality)
- `assets/` contains asset files the extension and its WebViews can retrieve using the `papi-extension:` protocol. It is copied into the build folder
- `assets/` contains asset files the extension and its WebViews can retrieve using the `papi-extension:` protocol, as well as textual descriptions in various languages. It is copied into the build folder
- `assets/displayData.json` contains (optionally) a path to the extension's icon file as well as text for the extension's display name, short summary, and path to the full description file
- `assets/descriptions/` contains textual descriptions of the extension in various languages
- `assets/descriptions/description-<locale>.md` contains a brief description of the extension in the language specified by `<locale>`
- `contributions/` contains JSON files the platform uses to extend data structures for things like menus and settings. The JSON files are referenced from the manifest
- `public/` contains other static files that are copied into the build folder
- `dist/` is a generated folder containing the built extension files
Expand Down
3 changes: 3 additions & 0 deletions assets/descriptions/description-en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Extension template for Paranext. Powered by webpack.

This is a webpack project template pre-configured to build a Platform.Bible extension. It contains the bare minimum of what an extension needs.
10 changes: 10 additions & 0 deletions assets/displayData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"icon": "",
"localizedDisplayInfo": {
"en": {
"displayName": "Paranext Extension Template",
"shortSummary": "Base template for a Paranext Extension",
"description": "assets/descriptions/description-en.md"
}
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "paranext-extension-template",
"version": "0.0.1",
"description": "Extension template for Paranext. Powered by webpack",
"displayData": "assets/displayData.json",
"author": "Paranext",
"license": "MIT",
"main": "src/main.ts",
Expand Down
108 changes: 81 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"react-dom": ">=18.2.0"
},
"dependencies": {
"@sillsdev/scripture": "^1.4.3",
"@sillsdev/scripture": "^2.0.0",
"platform-bible-utils": "file:../paranext-core/lib/platform-bible-utils"
},
"devDependencies": {
Expand Down

0 comments on commit d829c27

Please sign in to comment.