Skip to content

Commit

Permalink
Add slk (Slovak) language (see #140)
Browse files Browse the repository at this point in the history
  • Loading branch information
R0Wi committed Aug 1, 2022
1 parent bba5551 commit e016b77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ apt-get install ocrmypdf

The `ocrmypdf` CLI can also convert single image files (`jpg`/`png`) to PDF before processing it via OCR. This mode is also supported by this app. You can read more about it in the [official docs](https://ocrmypdf.readthedocs.io/en/latest/cookbook.html#option-use-ocrmypdf-single-images-only).

Also if you want to use specific **language settings** please install the corresponding `tesseract` packages.
Also if you want to use specific **language settings** please [install the corresponding `tesseract` packages](https://ocrmypdf.readthedocs.io/en/latest/languages.html).

```bash
# English
Expand Down
3 changes: 2 additions & 1 deletion lib/OcrProcessors/OcrMyPdfBasedProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ abstract class OcrMyPdfBasedProcessor implements IOcrProcessor {
'pt' => 'por',
'ru' => 'rus',
'chi' => 'chi_sim',
'est' => 'est'
'est' => 'est',
'slk' => 'slk'
];

/** @var ICommand */
Expand Down
1 change: 1 addition & 0 deletions src/components/WorkflowOcr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const availableLanguages = [
{ label: 'Russian', langCode: 'ru' },
{ label: 'Chinese - Simplified', langCode: 'chi' },
{ label: 'Estonian', langCode: 'est' },
{ label: 'Slovak', langCode: 'slk ' },
]

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/test/components/WorkflowOcr.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ describe('Init tests', () => {
})

describe('Language settings tests', () => {
test('Should have 9 languages available', () => {
test('Should have 10 languages available', () => {
const wrapper = mount(WorkflowOcr)
expect(wrapper.vm.availableLanguages.length).toBe(9)
expect(wrapper.vm.availableLanguages.length).toBe(10)
})

test('Should select one language', () => {
Expand Down

0 comments on commit e016b77

Please sign in to comment.