diff --git a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx index 7797384..8f346a6 100644 --- a/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx +++ b/src/paratext-bible-text-collection/src/web-views/paratext-text-collection.web-view.tsx @@ -41,12 +41,12 @@ globalThis.webViewComponent = function TextCollectionWebView({ const selectProjectsPromptKey = '%textCollection_dialog_selectProjectsToShow_prompt%'; const selectProjectsKey = '%webview_selectProjects%'; const textCollectionKey = '%textCollection_defaultTitle%'; - const [localizedStrings] = useLocalizedStrings([ - selectProjectsTitleKey, - selectProjectsPromptKey, - selectProjectsKey, - textCollectionKey, - ]); + const [localizedStrings] = useLocalizedStrings( + useMemo( + () => [selectProjectsTitleKey, selectProjectsPromptKey, selectProjectsKey, textCollectionKey], + [selectProjectsTitleKey, selectProjectsPromptKey, selectProjectsKey, textCollectionKey], + ), + ); const localizedSelectProjectsTitle = localizedStrings[selectProjectsTitleKey]; const localizedSelectProjectsPrompt = localizedStrings[selectProjectsPromptKey]; const localizedSelectProjects = localizedStrings[selectProjectsKey]; diff --git a/src/paratext-bible-word-list/contributions/localizedStrings.json b/src/paratext-bible-word-list/contributions/localizedStrings.json index 6cec3cd..9195f1e 100644 --- a/src/paratext-bible-word-list/contributions/localizedStrings.json +++ b/src/paratext-bible-word-list/contributions/localizedStrings.json @@ -5,11 +5,10 @@ "%mainMenu_openWordList%": "Open Word List", "%wordList_cloudView_label%": "Cloud", "%wordList_filter_defaultText%": "Word filter", - "%wordList_fullWordCount_titleFormat%": "Words ({fullWordCount}) \\{sortingDirectionIcon\\}", + "%wordList_fullWordCount_titleFormat%": "Words ({fullWordCount}) {sortingDirectionIcon}", "%wordList_openListForProject_prompt%": "Please select project to open in the word list:", "%wordList_openListForProject_title%": "Open Word List", "%wordList_partialWordCount_titleFormat%": "Words ({wordListLength} of {fullWordCount}) {sortingDirectionIcon}", - "%wordList_totalCount_titleFormat%": "Words ({fullWordCount})", "%wordList_tableView_label%": "Table", "%wordList_title_format%": "Word List {projectName}", "%wordList_titleWithProjectName_format%": "Word List for project {projectName}", @@ -20,11 +19,10 @@ "%mainMenu_openWordList%": "Abrir Lista de Palabras", "%wordList_cloudView_label%": "Nube", "%wordList_filter_defaultText%": "Filtro de palabra", - "%wordList_fullWordCount_titleFormat%": "Palabras ({fullWordCount}) \\{sortingDirectionIcon\\}", + "%wordList_fullWordCount_titleFormat%": "Palabras ({fullWordCount}) {sortingDirectionIcon}", "%wordList_openListForProject_prompt%": "Por favor, seleccione proyecto para abrir en la lista de palabras:", "%wordList_openListForProject_title%": "Abrir Lista de Palabras", "%wordList_partialWordCount_titleFormat%": "Palabras ({wordListLength} de {fullWordCount}) {sortingDirectionIcon}", - "%wordList_totalCount_titleFormat%": "Palabras ({fullWordCount})", "%wordList_tableView_label%": "Tabla", "%wordList_title_format%": "Lista de Palabras {projectName}", "%wordList_titleWithProjectName_format%": "Lista de Palabras para el proyecto {projectName}", diff --git a/src/paratext-bible-word-list/src/word-table.component.tsx b/src/paratext-bible-word-list/src/word-table.component.tsx index e20c24b..8814488 100644 --- a/src/paratext-bible-word-list/src/word-table.component.tsx +++ b/src/paratext-bible-word-list/src/word-table.component.tsx @@ -16,7 +16,7 @@ type WordTableProps = { }; const countFormatKey = '%wordList_wordCount_format%'; -const fullCountFormatKey = '%wordList_totalCount_titleFormat%'; +const fullCountFormatKey = '%wordList_fullWordCount_titleFormat%'; const partialCountFormatKey = '%wordList_partialWordCount_titleFormat%'; const getSortingIcon = (sortDirection: false | SortDirection): string => { @@ -78,7 +78,10 @@ export default function WordTable({ wordList, fullWordCount, onWordClick }: Word const wordColumnTitleFormat = useMemo(() => { return wordList.length === fullWordCount - ? formatReplacementString(localizedFullCountFormat, { fullWordCount }) + ? formatReplacementString(localizedFullCountFormat, { + fullWordCount, + sortingDirectionIcon: '{sortingDirectionIcon}', + }) : formatReplacementString(localizedPartialCountFormat, { wordListLength: wordList.length, fullWordCount,