Skip to content

Commit

Permalink
Add Estonian (#136) (#138)
Browse files Browse the repository at this point in the history
* see also #135
  • Loading branch information
R0Wi authored Jul 15, 2022
1 parent 8a5a4ba commit e4d7952
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/OcrProcessors/OcrMyPdfBasedProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ abstract class OcrMyPdfBasedProcessor implements IOcrProcessor {
'es' => 'spa',
'pt' => 'por',
'ru' => 'rus',
'chi' => 'chi_sim'
'chi' => 'chi_sim',
'est' => 'est'
];

/** @var ICommand */
Expand Down Expand Up @@ -111,7 +112,7 @@ protected function getAdditionalCommandlineArgs(WorkflowSettings $settings, Glob
private function getCommandlineArgs(WorkflowSettings $settings, GlobalSettings $globalSettings): string {
// Default setting is quiet with skip-text
$args = ['-q', '--skip-text'];

// Language settings
if ($settings->getLanguages()) {
$langStr = Chain::create($settings->getLanguages())
Expand All @@ -138,7 +139,7 @@ private function getCommandlineArgs(WorkflowSettings $settings, GlobalSettings $
}

$resultArgs = array_merge($args, $this->getAdditionalCommandlineArgs($settings, $globalSettings));

return implode(' ', $resultArgs);
}
}
1 change: 1 addition & 0 deletions src/components/WorkflowOcr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const availableLanguages = [
{ label: 'Portuguese', langCode: 'pt' },
{ label: 'Russian', langCode: 'ru' },
{ label: 'Chinese - Simplified', langCode: 'chi' },
{ label: 'Estonian', langCode: 'est' },
]

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 8 languages available', () => {
test('Should have 9 languages available', () => {
const wrapper = mount(WorkflowOcr)
expect(wrapper.vm.availableLanguages.length).toBe(8)
expect(wrapper.vm.availableLanguages.length).toBe(9)
})

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

0 comments on commit e4d7952

Please sign in to comment.