diff --git a/ext/js/language/ja/japanese-transforms.js b/ext/js/language/ja/japanese-transforms.js index 9220178498..2c6264ccbc 100644 --- a/ext/js/language/ja/japanese-transforms.js +++ b/ext/js/language/ja/japanese-transforms.js @@ -181,8 +181,8 @@ const conditions = { name: 'Intermediate -ku endings for adverbs', isDictionaryForm: false, }, - 'past': { - name: '-ta past form ending', + '-ta': { + name: '-ta form ending', isDictionaryForm: false, }, '-n': { @@ -1142,7 +1142,7 @@ export const japaneseTransforms = { '2. Indicates the completion of an action.\n' + '3. Indicates the confirmation of a matter.\n' + '4. Indicates the speaker\'s confidence that the action will definitely be fulfilled.\n' + - '5. Indicates the events that occur before the main clause are represented as relative past.\n' + + '5. Indicates the events that occur before the main clause are represented as relative -ta.\n' + '6. Indicates a mild imperative/command.\n' + 'Usage: Attach た to the continuative form (renyoukei) of verbs after euphonic change form, かった to the stem of i-adjectives.', i18n: [ @@ -1152,27 +1152,27 @@ export const japaneseTransforms = { }, ], rules: [ - suffixInflection('かった', 'い', ['past'], ['adj-i']), - suffixInflection('た', 'る', ['past'], ['v1']), - suffixInflection('いた', 'く', ['past'], ['v5']), - suffixInflection('いだ', 'ぐ', ['past'], ['v5']), - suffixInflection('した', 'す', ['past'], ['v5']), - suffixInflection('った', 'う', ['past'], ['v5']), - suffixInflection('った', 'つ', ['past'], ['v5']), - suffixInflection('った', 'る', ['past'], ['v5']), - suffixInflection('んだ', 'ぬ', ['past'], ['v5']), - suffixInflection('んだ', 'ぶ', ['past'], ['v5']), - suffixInflection('んだ', 'む', ['past'], ['v5']), - suffixInflection('じた', 'ずる', ['past'], ['vz']), - suffixInflection('した', 'する', ['past'], ['vs']), - suffixInflection('為た', '為る', ['past'], ['vs']), - suffixInflection('きた', 'くる', ['past'], ['vk']), - suffixInflection('来た', '来る', ['past'], ['vk']), - suffixInflection('來た', '來る', ['past'], ['vk']), - ...irregularVerbSuffixInflections('た', ['past'], ['v5']), - suffixInflection('ました', 'ます', ['past'], ['-masu']), - suffixInflection('でした', '', ['past'], ['-masen']), - suffixInflection('かった', '', ['past'], ['-masen', '-n']), + suffixInflection('かった', 'い', ['-ta'], ['adj-i']), + suffixInflection('た', 'る', ['-ta'], ['v1']), + suffixInflection('いた', 'く', ['-ta'], ['v5']), + suffixInflection('いだ', 'ぐ', ['-ta'], ['v5']), + suffixInflection('した', 'す', ['-ta'], ['v5']), + suffixInflection('った', 'う', ['-ta'], ['v5']), + suffixInflection('った', 'つ', ['-ta'], ['v5']), + suffixInflection('った', 'る', ['-ta'], ['v5']), + suffixInflection('んだ', 'ぬ', ['-ta'], ['v5']), + suffixInflection('んだ', 'ぶ', ['-ta'], ['v5']), + suffixInflection('んだ', 'む', ['-ta'], ['v5']), + suffixInflection('じた', 'ずる', ['-ta'], ['vz']), + suffixInflection('した', 'する', ['-ta'], ['vs']), + suffixInflection('為た', '為る', ['-ta'], ['vs']), + suffixInflection('きた', 'くる', ['-ta'], ['vk']), + suffixInflection('来た', '来る', ['-ta'], ['vk']), + suffixInflection('來た', '來る', ['-ta'], ['vk']), + ...irregularVerbSuffixInflections('た', ['-ta'], ['v5']), + suffixInflection('ました', 'ます', ['-ta'], ['-masu']), + suffixInflection('でした', '', ['-ta'], ['-masen']), + suffixInflection('かった', '', ['-ta'], ['-masen', '-n']), ], }, '-masu': { @@ -1582,8 +1582,8 @@ export const japaneseTransforms = { suffixInflection('へん', 'ない', [], ['adj-i']), suffixInflection('ひん', 'ない', [], ['adj-i']), suffixInflection('せえへん', 'しない', [], ['adj-i']), - suffixInflection('へんかった', 'なかった', ['past'], ['past']), - suffixInflection('ひんかった', 'なかった', ['past'], ['past']), + suffixInflection('へんかった', 'なかった', ['-ta'], ['-ta']), + suffixInflection('ひんかった', 'なかった', ['-ta'], ['-ta']), suffixInflection('うてへん', 'ってない', [], ['adj-i']), ], }, @@ -1626,21 +1626,21 @@ export const japaneseTransforms = { }, ], rules: [ - suffixInflection('うた', 'った', ['past'], ['past']), - suffixInflection('おうた', 'あった', ['past'], ['past']), - suffixInflection('こうた', 'かった', ['past'], ['past']), - suffixInflection('ごうた', 'がった', ['past'], ['past']), - suffixInflection('そうた', 'さった', ['past'], ['past']), - suffixInflection('ぞうた', 'ざった', ['past'], ['past']), - suffixInflection('とうた', 'たった', ['past'], ['past']), - suffixInflection('どうた', 'だった', ['past'], ['past']), - suffixInflection('のうた', 'なった', ['past'], ['past']), - suffixInflection('ほうた', 'はった', ['past'], ['past']), - suffixInflection('ぼうた', 'ばった', ['past'], ['past']), - suffixInflection('もうた', 'まった', ['past'], ['past']), - suffixInflection('ろうた', 'らった', ['past'], ['past']), - suffixInflection('ようた', 'やった', ['past'], ['past']), - suffixInflection('ゆうた', 'いった', ['past'], ['past']), + suffixInflection('うた', 'った', ['-ta'], ['-ta']), + suffixInflection('おうた', 'あった', ['-ta'], ['-ta']), + suffixInflection('こうた', 'かった', ['-ta'], ['-ta']), + suffixInflection('ごうた', 'がった', ['-ta'], ['-ta']), + suffixInflection('そうた', 'さった', ['-ta'], ['-ta']), + suffixInflection('ぞうた', 'ざった', ['-ta'], ['-ta']), + suffixInflection('とうた', 'たった', ['-ta'], ['-ta']), + suffixInflection('どうた', 'だった', ['-ta'], ['-ta']), + suffixInflection('のうた', 'なった', ['-ta'], ['-ta']), + suffixInflection('ほうた', 'はった', ['-ta'], ['-ta']), + suffixInflection('ぼうた', 'ばった', ['-ta'], ['-ta']), + suffixInflection('もうた', 'まった', ['-ta'], ['-ta']), + suffixInflection('ろうた', 'らった', ['-ta'], ['-ta']), + suffixInflection('ようた', 'やった', ['-ta'], ['-ta']), + suffixInflection('ゆうた', 'いった', ['-ta'], ['-ta']), ], }, 'kansai-ben -tara': { diff --git a/test/data/translator-test-results-note-data1.json b/test/data/translator-test-results-note-data1.json index 069368cca7..b3c1407c95 100644 --- a/test/data/translator-test-results-note-data1.json +++ b/test/data/translator-test-results-note-data1.json @@ -31889,7 +31889,7 @@ }, { "name": "kansai-ben", - "description": "past form of kansai-ben terms" + "description": "-ta form of kansai-ben terms" } ] }, diff --git a/test/data/translator-test-results.json b/test/data/translator-test-results.json index 0f2ab2ed0b..63e7c01e11 100644 --- a/test/data/translator-test-results.json +++ b/test/data/translator-test-results.json @@ -18321,7 +18321,7 @@ }, { "name": "kansai-ben", - "description": "past form of kansai-ben terms" + "description": "-ta form of kansai-ben terms" } ] }, diff --git a/test/language/japanese-transforms.test.js b/test/language/japanese-transforms.test.js index a4186f9f7a..df160965ed 100644 --- a/test/language/japanese-transforms.test.js +++ b/test/language/japanese-transforms.test.js @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import { japaneseTransforms } from '../../ext/js/language/ja/japanese-transforms.js'; -import { LanguageTransformer } from '../../ext/js/language/language-transformer.js'; -import { testLanguageTransformer } from '../fixtures/language-transformer-test.js'; +import {japaneseTransforms} from '../../ext/js/language/ja/japanese-transforms.js'; +import {LanguageTransformer} from '../../ext/js/language/language-transformer.js'; +import {testLanguageTransformer} from '../fixtures/language-transformer-test.js'; /* eslint-disable @stylistic/no-multi-spaces */ const tests = [ @@ -1491,7 +1491,7 @@ const tests = [ ], }, { - category: 'past form of kansai-ben terms', + category: '-ta form of kansai-ben terms', valid: true, tests: [ {term: '買う', source: '買うた', rule: null, reasons: ['-ta', 'kansai-ben -ta']},