Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slk (Slovak) language (see #140) #141

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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