당직근무 0.14.3 (웹 2026-11-25.3): 조사 오류 고침

- 업데이트 안내 "새로운 당직근무이" → "당직근무 새 버전이"(앞 커밋 be0e73d를 이번 APK에 넣음)
- 조사 자동 고르기(앱 Korean.kt · 서버 korean.py · 웹 korean.js): 근무·일정 겹침 안내, 교환 확인, 관리자·게시판 입력 오류 안내
- 게시판 관리 알림 "숨기기 했습니다" → "숨겼습니다" 등
- 앱 0.14.3 / 설치 번호 23. APK 870782바이트, SHA-256 c6f9e3045a3f0af1684ad748e5e5653732d12e9f3bfd8e1abfe3f2f236be7878
- 검사: 서버 104개(조사 1개 새로), 앱 단위 56개, 조사 JS 검사
This commit is contained in:
블리어 committed 2026-11-25 01:21:29 +00:00
1 parent be0e73d307
commit 6c77fc998c
24 files changed
+169 -38

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
'use strict';
/* 앞말의 끝소리에 맞춰 조사를 고른다(과/와 · 을/를 · 은/는 · 이/가 · 으로/로).
* 근무 이름과 일정 제목처럼 바뀌는 말 뒤에 조사를 고정하면 "일반근무과"처럼 틀린다.
* 숫자는 읽는 소리로 본다(0 영 · 1 일 · 3 삼 · 6 육 · 7 칠 · 8 팔은 받침 있음). 끝의 괄호와 따옴표는 건너뛴다.
* 앱(Korean.kt)과 서버(korean.py)도 같은 규칙이다. */
function josa(word, withBatchim, without) {
const text = String(word ?? '');
const last = text.replace(/[\s)\]}"'.」』]+$/u, '').slice(-1);
let batchim = false, rieul = false;
if (last >= '가' && last <= '힣') {
const tail = (last.charCodeAt(0) - 0xac00) % 28;
batchim = tail !== 0; rieul = tail === 8;
} else if (/^[0-9]$/.test(last)) {
batchim = '013678'.includes(last); rieul = '178'.includes(last);
}
if (withBatchim === '으로') return text + (batchim && !rieul ? '으로' : '로');
return text + (batchim ? withBatchim : without);
}
if (typeof module !== 'undefined') module.exports = { josa };