aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language
Commit message (Collapse)AuthorAge
* make deinflections language-specific (#720)StefanVukovic992024-02-27
| | | | | | | | | | | | | * abstract deinflections * undo redundant changes * remove cast * MultiLanguageTransformer * comments * comments
* "isJapanese" check move (#730)toasted-nutbread2024-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move isStringPartiallyJapanese out of ClipboardMonitor * Create isStringPartiallyJapanese function * Add textMayBeTranslatable * Rename API function * Rename internal function * Add helper * Update translatable check * Pass language to TextScanner * Pass language explicitly * Use textMayBeTranslatable * No redundant translatable check * Update eslint * Remove double newline * Collapse * Rename
* Turn on @typescript-eslint/no-unsafe-argument (#728)24.2.26.0toasted-nutbread2024-02-25
|
* fix translator bug, simplify language-transformer (#687)24.2.23.0StefanVukovic992024-02-23
| | | | | | | | | | | | | | | * simplify transformer * use isPartOfSpeech * simplify * rename to isDictionaryForm * NOP --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* add more languages (#684)StefanVukovic992024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * add more languages * wip * refactoring * fixes * add comment, delete settings text * remove language from jsconfig --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Constructor simplification (#713)toasted-nutbread2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update AudioDownloader * Update Translator * Update ClipboardMonitor * Update ClipboardReader * Update PanelElement * Update QueryParser * Update DisplayGenerator * Update DisplayHistory * Update DOMDataBinder * Remove unnecessary cast * Update Popup types * One declaration per line * Remove optionals from Frontend constructor * Fix Translator constructor
* Update eslint rules (#710)toasted-nutbread2024-02-19
|
* Refactor DocumentUtil (#706)toasted-nutbread2024-02-18
| | | | | * Refactor DocumentUtil * Isolate suppression
* Language descriptors organization (#704)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | * Move languageDescriptorMap * Move text preprocessors * Merge into language-descriptors.js * Merge typescript * Initialize inline * Move types * Update types * Update eslint * Update jsconfig reference * Rename
* Log update (#701)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't export Logger * Rename logger.js to log.js * Move helper function * Update extension name configuration * Simplify docs * Move issue URL to a field * Simplify context * Remove optional params that are never used * Configure backend * Update eslint * Simplify * Rename function * Simplify _api reference * Simplify docs * Remove unused log levels (except 'log') * Add log function * Rename for more clear intent * Use log.log
* add language select, abstract text transformations (#584)StefanVukovic992024-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * simplify language controller --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Even more eslint rules (#696)toasted-nutbread2024-02-17
| | | | | | | | | * capitalized-comments * Turn rules on * Add miscellaneous rules * More rules
* Eslint rule updates (#673)toasted-nutbread2024-02-15
| | | | | | | | | | | | | | | | | * Install unicorn * Add rules * Fix issues * Install sonarjs * Set up rules * Fix issues * Install eslint-plugin-import and fix import extensions * Simplify permitted error names
* Transformation performance optimizations (#645)Cashew2024-02-07
| | | | | | | | | | | | | | | | | | | | | | * perform transformation bounds * fix wrong continue * fix wrong undefined check * regex performance * suffixHeuristic * escape RegExp * fix escapeRegExp * move destructuring after suffixHeuristic check --------- Co-authored-by: Stefan Vukovic <stefanvukovic44@gmail.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* move files (#630)StefanVukovic992024-02-04
|
* Text source generator function move (#611)toasted-nutbread2024-02-03
| | | | | | | * Move functionality into TextSourceGenerator * Move extractSentence * Move isWhitespace
* Fix auto hide search popup (#592)toasted-nutbread2024-02-03
| | | | | | | | | | | * Remove return * Update searched event * Fix auto-hide search popup event not occuring * Add TODO * Split into multiple events
* Application refactor (#591)toasted-nutbread2024-02-01
| | | | | | | | | | | * Rename Yomitan class to Application, change initialization style * Rename file * Update init * Update config * Remove dead code
* Document util + google docs util state refactor (#590)toasted-nutbread2024-01-31
| | | | | | | | | * Remove static from GoogleDocsUtil since it has state * Create TextSourceGenerator * Remove DocumentUtil custom registrations * Use TextSourceGenerator
* Module refactoring (#588)toasted-nutbread2024-01-31
| | | | | | | | | | | | | | | | | | | | | * Convert PronunciationGenerator into static functions * Convert DictionaryDataUtil into static functions * Convert AnkiNoteDataCreator into static functions * Convert MediaUtil into static functions * Convert RegexUtil into static functions * Convert StringUtil into static functions * Convert ArrayBufferUtil into static functions * Convert AnkiUtil into static functions * Convert PermissionsUtil into static functions * Convert ProfileConditionsUtil into static functions
* Language transformer (#582)toasted-nutbread2024-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Set up new deinflection data file * Define types * Test * Add internal types * Set up loading for transforms * Add getPartOfSpeechFlags * Convert static methods * Add note * Add transform function * Update trace structure * Add a language tag to the language transform descriptor * Add clear function * Add function for multiple parts of speech * Clarify naming * Add getConditionFlagsFromConditionType * Add plural function * Replace usages of Deinflector * Update tests * Update config * Remove old * Rename * Rename files
* JapaneseUtil refactor (#555)toasted-nutbread2024-01-28
| | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions
* Remove unneeded eslint disables (#554)toasted-nutbread2024-01-27
| | | | | * Install eslint-plugin-eslint-comments * Update rules, fix issues
* fix deinflection bug (#547)StefanVukovic992024-01-27
| | | | | * fix deinflection bug * add test
* Separate core classes into separate files (#545)toasted-nutbread2024-01-20
|
* Add Deinflector.rulesMatch helper function (#530)toasted-nutbread2024-01-20
|
* Update copyright year (#524)toasted-nutbread2024-01-20
| | | | | | | | | | | | | * Update copyright year * Update lib files * Rebase updates * Update dates * Update years to range * Update permitted pattern
* Dictionary deinflections (#503)StefanVukovic992024-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wip * wip * fix v3 * wip * fix tests * fix maxitems * hide deinflection definitions * fix anki template * undo unnecessary change * delete console.log * refactor * add set false to handlebars * lint * fix tests * fix comments * fix * use Map in areArraysEqualIgnoreOrder * move inflection source icons to css * lint * improve naming * fix tests * add test * typescript * use for of * wip * comments * anki template upgrade * update descriptions
* add option to disable part of speech rule check (#438)StefanVukovic992024-01-13
| | | | | | | | | | | | | | | | | | | | | | | * pos filter wip * add part of speech filter option * add part of speech filter option * remove from deinflector * update test * remove return * tie to dictionary * duplicate to welcome page * delete unused html * fix ts * typo
* Comment updates (#481)Cashew2023-12-29
| | | | | * comment updates * comment updates
* Add explicit passive option to touchstart event (#480)toasted-nutbread2023-12-29
|
* Event dispatcher refactor (#463)toasted-nutbread2023-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor EventDispatcher template type * Update core types * Update log * Update clipboard monitor * Update application events * Update popup events * Update text scanner * Update cross frame API * Update display events * Type updates * Update display history * Update query parser * Update search persistent state controller * Update panel element * Update popup menu * Update audio system * Update hotkey handler * Update settings controller * Update audio controller * Update types * Update types * Update types * Add event handler types * Update type * Fix issues * Remove error suppression * Fix typo
* search resolution option (#436)StefanVukovic992023-12-29
| | | | | | | | | | | | | | | * add search resolution setting * move finding next substring to method * use regex literal * fix comments * fix comments * add options update function * update test
* add phonetic transcriptions term meta type (#434)StefanVukovic992023-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move dictionary files to dictionary folder * wip * move dictionary files to dictionary folder * add ipa term meta * wip * fixing comments wip * fixing comments wip * fixing comments wip * fixing comments wip * fixing comments wip * fixing comments wip * fix comments * fix comments * update test data * fix gitignore * engines * add tests * update database test * fix test
* Narrow down enum types (#431)Cashew2023-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * narrow down enum types * add enum types * change from default to case * add enum types * remove comments * remove comments * fix * Move getErrorLevelValue to Logger * Add enum type for LogErrorLevelValue * add eslint switch-exhaustiveness-check rule * Revert "add eslint switch-exhaustiveness-check" This reverts commit 49f9caabf0af900bc5ba2b80f5baff72c27e02cd. * move from labelled loop to helper functions * move helper functions downward
* move dictionary files to dictionary folder (#429)StefanVukovic992023-12-23
|
* Add support for alt attribute on structured content images (#359)Stephen Kraus2023-12-23
| | | | | | | | | | | * Add support for alt attribute on structured content images * Add new `alt` property for structured content images * Update test script with new media file count --------- Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
* Minor optimizations for dictionary import (#412)Cashew2023-12-21
| | | | | | | * minor dictionary import optimizations * fix comment * use regex for matching
* rename variables (#409)Cashew2023-12-20
| | | | | | | | | | | * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions
* rename variables (#404)Cashew2023-12-20
|
* fix typo (#405)Cashew2023-12-20
|
* Declare static fields using modern JavaScript syntax (#400)toasted-nutbread2023-12-20
|
* Template type improvements (#380)toasted-nutbread2023-12-19
| | | | | | | * Default templates to unknown * Default typescript templates to unknown * More template type updates
* Make JSON.parse usage safer (#373)toasted-nutbread2023-12-19
| | | | | | | | | | | | | | | * Make JSON.parse usage safer * Fix any type * Add readResponseJson * Use readResponseJson * Additional updates * Rename files * Add types
* update JSDoc comments (#387)Cashew2023-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lesen-tan initial commit * update README.md * tidy up code * opt for Map<K, V> instead of Object * Document dev/* * add docs for deinflector.js * update deinflector example * Annotate * Revert "Merge branch 'development' of https://github.com/Scrub1492/lesen-tan into development" This reverts commit b92348f702bc031b36f24462adfa940d17f9ecdd, reversing changes made to 3255e6d963281af3533dcf1e893df39032d29fec. * Lint error fix * Lint error fix * update JSDoc comments --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* IIFE updates (#384)toasted-nutbread2023-12-19
| | | | | | | * Remove most IIFEs * Move IIFEs into functions * Don't await background-main
* Add some JSDoc annotations to describe code functionality. (#355)Cashew2023-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | * lesen-tan initial commit * update README.md * tidy up code * opt for Map<K, V> instead of Object * Document dev/* * add docs for deinflector.js * update deinflector example * Annotate * Revert "Merge branch 'development' of https://github.com/Scrub1492/lesen-tan into development" This reverts commit b92348f702bc031b36f24462adfa940d17f9ecdd, reversing changes made to 3255e6d963281af3533dcf1e893df39032d29fec. * Lint error fix * Lint error fix
* Fix Non JP Scanning Option for Kanji Dictionaries (#372)marv2023-12-18
| | | | | | | * Fix non JP scanning option for kanji dictionaries * Fix trailing comma * Add removeNonJapaneseCharacters to test inputs
* Mock updates (#370)toasted-nutbread2023-12-18
| | | | | | | | | * Move DictionaryImporterMediaLoader mock * Move TemplateRendererProxy mock * Simplify mock * Remove ignore rule because it seems unused
* Update eslint spacing rules (#366)toasted-nutbread2023-12-17
| | | | | | | | | * Add space-infix-ops rule * Add no-multi-spaces --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>