From 5ba97c6c4652b41998debd5d197f21608fb6f921 Mon Sep 17 00:00:00 2001 From: ArrayIterator Date: Sat, 21 Oct 2023 03:09:35 +0700 Subject: [PATCH] patch scripts & add enhancements --- src/Lang/default.pot | 230 ++++++++--------- src/Lang/id.po | 232 +++++++++--------- src/Responder/HtmlResponder.php | 13 +- .../Interfaces/ResponderInterface.php | 2 + src/Responder/JsonResponder.php | 12 +- src/Routing/AbstractController.php | 47 ++-- src/Routing/Router.php | 1 + src/Uploader/Chunk.php | 2 +- src/Uploader/ChunkHandler.php | 30 ++- src/Util/Filter/DataType.php | 2 +- 10 files changed, 301 insertions(+), 270 deletions(-) diff --git a/src/Lang/default.pot b/src/Lang/default.pot index 142c753..f9cf6cb 100644 --- a/src/Lang/default.pot +++ b/src/Lang/default.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: TrayDigita 1.0.0\n" -"POT-Creation-Date: 2023-10-19 21:20+0700\n" +"POT-Creation-Date: 2023-10-21 03:07+0700\n" "PO-Revision-Date: 2023-09-24 19:00+0700\n" "Last-Translator: ArrayAccess\n" "Language-Team: ArrayAccess\n" @@ -638,11 +638,11 @@ msgstr "" #: Console/Command/ControllerGenerator.php:296 #: Console/Command/DatabaseChecker.php:1255 #: Console/Command/DatabaseChecker.php:1397 -#: Console/Command/DatabaseEventGenerator.php:331 +#: Console/Command/DatabaseEventGenerator.php:330 #: Console/Command/EntityGenerator.php:327 -#: Console/Command/MiddlewareGenerator.php:328 +#: Console/Command/MiddlewareGenerator.php:327 #: Console/Command/ModuleGenerator.php:347 -#: Console/Command/SchedulerGenerator.php:355 +#: Console/Command/SchedulerGenerator.php:354 msgctxt "console" msgid "Are you sure to continue (Yes/No)?" msgstr "" @@ -652,11 +652,11 @@ msgstr "" #: Console/Command/ControllerGenerator.php:309 #: Console/Command/DatabaseChecker.php:1270 #: Console/Command/DatabaseChecker.php:1412 -#: Console/Command/DatabaseEventGenerator.php:344 +#: Console/Command/DatabaseEventGenerator.php:343 #: Console/Command/EntityGenerator.php:340 -#: Console/Command/MiddlewareGenerator.php:343 +#: Console/Command/MiddlewareGenerator.php:342 #: Console/Command/ModuleGenerator.php:362 -#: Console/Command/SchedulerGenerator.php:368 +#: Console/Command/SchedulerGenerator.php:367 msgctxt "console" msgid "Please enter valid answer! (Yes / No)" msgstr "" @@ -666,11 +666,11 @@ msgstr "" #: Console/Command/ControllerGenerator.php:351 #: Console/Command/DatabaseChecker.php:1282 #: Console/Command/DatabaseChecker.php:1426 -#: Console/Command/DatabaseEventGenerator.php:388 +#: Console/Command/DatabaseEventGenerator.php:387 #: Console/Command/EntityGenerator.php:385 -#: Console/Command/MiddlewareGenerator.php:387 +#: Console/Command/MiddlewareGenerator.php:386 #: Console/Command/ModuleGenerator.php:406 -#: Console/Command/SchedulerGenerator.php:414 +#: Console/Command/SchedulerGenerator.php:413 msgctxt "console" msgid "Operation cancelled!" msgstr "" @@ -692,11 +692,11 @@ msgstr "" #: Console/Command/CommandGenerator.php:87 #: Console/Command/ControllerGenerator.php:90 -#: Console/Command/DatabaseEventGenerator.php:91 +#: Console/Command/DatabaseEventGenerator.php:90 #: Console/Command/EntityGenerator.php:86 -#: Console/Command/MiddlewareGenerator.php:88 +#: Console/Command/MiddlewareGenerator.php:87 #: Console/Command/ModuleGenerator.php:86 -#: Console/Command/SchedulerGenerator.php:89 +#: Console/Command/SchedulerGenerator.php:88 msgctxt "console" msgid "Print generated class file only" msgstr "" @@ -755,11 +755,11 @@ msgstr "" #: Console/Command/CommandGenerator.php:272 #: Console/Command/ControllerGenerator.php:242 -#: Console/Command/DatabaseEventGenerator.php:271 +#: Console/Command/DatabaseEventGenerator.php:270 #: Console/Command/EntityGenerator.php:255 -#: Console/Command/MiddlewareGenerator.php:267 +#: Console/Command/MiddlewareGenerator.php:266 #: Console/Command/ModuleGenerator.php:271 -#: Console/Command/SchedulerGenerator.php:278 +#: Console/Command/SchedulerGenerator.php:277 #, php-format msgctxt "console" msgid "%s generator only support in interactive mode" @@ -1197,12 +1197,12 @@ msgid "Database password" msgstr "" #: Console/Command/DatabaseChecker.php:1695 -#: Console/Command/SchedulerAction.php:121 -#: Console/Command/SchedulerAction.php:205 -#: Console/Command/SchedulerAction.php:216 -#: Console/Command/SchedulerAction.php:228 -#: Console/Command/SchedulerAction.php:276 -#: Console/Command/SchedulerAction.php:311 +#: Console/Command/SchedulerAction.php:120 +#: Console/Command/SchedulerAction.php:204 +#: Console/Command/SchedulerAction.php:215 +#: Console/Command/SchedulerAction.php:227 +#: Console/Command/SchedulerAction.php:275 +#: Console/Command/SchedulerAction.php:310 msgctxt "console" msgid "Unknown" msgstr "" @@ -1287,12 +1287,12 @@ msgctxt "console" msgid "Contains changed database schema, you can check with command :" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:85 +#: Console/Command/DatabaseEventGenerator.php:84 msgctxt "console" msgid "Generate database event class." msgstr "" -#: Console/Command/DatabaseEventGenerator.php:96 +#: Console/Command/DatabaseEventGenerator.php:95 #, php-format msgctxt "console" msgid "" @@ -1302,23 +1302,23 @@ msgid "" "Database Event only support single class name." msgstr "" -#: Console/Command/DatabaseEventGenerator.php:180 +#: Console/Command/DatabaseEventGenerator.php:179 msgctxt "console" msgid "Please enter database event class name" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:186 +#: Console/Command/DatabaseEventGenerator.php:185 msgctxt "console" msgid "Please enter valid database event class name!" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:195 +#: Console/Command/DatabaseEventGenerator.php:194 #, php-format msgctxt "console" msgid "Event [%s] is invalid! class name contain reserved keyword!" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:206 +#: Console/Command/DatabaseEventGenerator.php:205 #, php-format msgctxt "console" msgid "" @@ -1326,49 +1326,49 @@ msgid "" "namespaced!" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:217 +#: Console/Command/DatabaseEventGenerator.php:216 #, php-format msgctxt "console" msgid "Database event [%s] is too long! Must be less or equal 128 characters" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:227 +#: Console/Command/DatabaseEventGenerator.php:226 #, php-format msgctxt "console" msgid "Database event [%s] exist" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:257 +#: Console/Command/DatabaseEventGenerator.php:256 #, php-format msgctxt "console" msgid "%s Could not detect database event directory" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:294 +#: Console/Command/DatabaseEventGenerator.php:293 #, php-format msgctxt "console" msgid "Database Event Name : %s" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:307 +#: Console/Command/DatabaseEventGenerator.php:306 #, php-format msgctxt "console" msgid "DatabaseEvent Class : %s" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:319 +#: Console/Command/DatabaseEventGenerator.php:318 #, php-format msgctxt "console" msgid "DatabaseEvent File : %s" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:366 +#: Console/Command/DatabaseEventGenerator.php:365 #, php-format msgctxt "console" msgid "%s Could not save databaseEvent!" msgstr "" -#: Console/Command/DatabaseEventGenerator.php:377 +#: Console/Command/DatabaseEventGenerator.php:376 #, php-format msgctxt "console" msgid "%s DatabaseEvent successfully created!" @@ -1458,12 +1458,12 @@ msgctxt "console" msgid "%s Entity successfully created!" msgstr "" -#: Console/Command/MiddlewareGenerator.php:82 +#: Console/Command/MiddlewareGenerator.php:81 msgctxt "console" msgid "Generate middleware class." msgstr "" -#: Console/Command/MiddlewareGenerator.php:93 +#: Console/Command/MiddlewareGenerator.php:92 #, php-format msgctxt "console" msgid "" @@ -1472,17 +1472,17 @@ msgid "" "Middleware will use prefix namespace with %s\n" msgstr "" -#: Console/Command/MiddlewareGenerator.php:177 +#: Console/Command/MiddlewareGenerator.php:176 msgctxt "console" msgid "Please enter middleware class name" msgstr "" -#: Console/Command/MiddlewareGenerator.php:186 +#: Console/Command/MiddlewareGenerator.php:185 msgctxt "console" msgid "Please enter valid middleware class name!" msgstr "" -#: Console/Command/MiddlewareGenerator.php:194 +#: Console/Command/MiddlewareGenerator.php:193 #, php-format msgctxt "console" msgid "" @@ -1490,49 +1490,49 @@ msgid "" "namespaced!" msgstr "" -#: Console/Command/MiddlewareGenerator.php:208 +#: Console/Command/MiddlewareGenerator.php:207 #, php-format msgctxt "console" msgid "Middleware [%s] is invalid! class name contain reserved keyword!" msgstr "" -#: Console/Command/MiddlewareGenerator.php:219 +#: Console/Command/MiddlewareGenerator.php:218 #, php-format msgctxt "console" msgid "Middleware [%s] exist" msgstr "" -#: Console/Command/MiddlewareGenerator.php:253 +#: Console/Command/MiddlewareGenerator.php:252 #, php-format msgctxt "console" msgid "%s Could not detect middleware directory" msgstr "" -#: Console/Command/MiddlewareGenerator.php:289 +#: Console/Command/MiddlewareGenerator.php:288 #, php-format msgctxt "console" msgid "Middleware Name : %s" msgstr "" -#: Console/Command/MiddlewareGenerator.php:303 +#: Console/Command/MiddlewareGenerator.php:302 #, php-format msgctxt "console" msgid "Middleware Class : %s" msgstr "" -#: Console/Command/MiddlewareGenerator.php:315 +#: Console/Command/MiddlewareGenerator.php:314 #, php-format msgctxt "console" msgid "Middleware File : %s" msgstr "" -#: Console/Command/MiddlewareGenerator.php:365 +#: Console/Command/MiddlewareGenerator.php:364 #, php-format msgctxt "console" msgid "%s Could not save middleware!" msgstr "" -#: Console/Command/MiddlewareGenerator.php:376 +#: Console/Command/MiddlewareGenerator.php:375 #, php-format msgctxt "console" msgid "%s Middleware successfully created!" @@ -1631,145 +1631,145 @@ msgctxt "console" msgid "%s Module successfully created!" msgstr "" -#: Console/Command/SchedulerAction.php:50 +#: Console/Command/SchedulerAction.php:49 msgctxt "console" msgid "List or run scheduler." msgstr "" -#: Console/Command/SchedulerAction.php:57 +#: Console/Command/SchedulerAction.php:56 msgctxt "console" msgid "Run the pending schedulers" msgstr "" -#: Console/Command/SchedulerAction.php:63 +#: Console/Command/SchedulerAction.php:62 #, php-format msgctxt "console" msgid "The %s help you to list & run scheduler" msgstr "" -#: Console/Command/SchedulerAction.php:85 +#: Console/Command/SchedulerAction.php:84 msgctxt "console" msgid "Object scheduler is not valid" msgstr "" -#: Console/Command/SchedulerAction.php:109 -#: Console/Command/SchedulerAction.php:259 +#: Console/Command/SchedulerAction.php:108 +#: Console/Command/SchedulerAction.php:258 msgctxt "console" msgid "Id" msgstr "" -#: Console/Command/SchedulerAction.php:110 -#: Console/Command/SchedulerAction.php:260 +#: Console/Command/SchedulerAction.php:109 +#: Console/Command/SchedulerAction.php:259 msgctxt "console" msgid "Name" msgstr "" -#: Console/Command/SchedulerAction.php:111 -#: Console/Command/SchedulerAction.php:261 +#: Console/Command/SchedulerAction.php:110 +#: Console/Command/SchedulerAction.php:260 msgctxt "console" msgid "Status" msgstr "" -#: Console/Command/SchedulerAction.php:112 -#: Console/Command/SchedulerAction.php:262 +#: Console/Command/SchedulerAction.php:111 +#: Console/Command/SchedulerAction.php:261 msgctxt "console" msgid "Last Execution" msgstr "" -#: Console/Command/SchedulerAction.php:113 +#: Console/Command/SchedulerAction.php:112 msgctxt "console" msgid "Execution Time" msgstr "" -#: Console/Command/SchedulerAction.php:117 +#: Console/Command/SchedulerAction.php:116 msgctxt "console" msgid "Waiting" msgstr "" -#: Console/Command/SchedulerAction.php:136 +#: Console/Command/SchedulerAction.php:135 msgctxt "console" msgid "No Schedulers Waiting For Execution" msgstr "" -#: Console/Command/SchedulerAction.php:154 +#: Console/Command/SchedulerAction.php:153 msgctxt "console" msgid "Are you sure to execute scheduler ?" msgid_plural "Are you sure to execute schedulers ?" msgstr[0] "" msgstr[1] "" -#: Console/Command/SchedulerAction.php:201 +#: Console/Command/SchedulerAction.php:200 msgctxt "console" msgid "Success" msgstr "" -#: Console/Command/SchedulerAction.php:202 +#: Console/Command/SchedulerAction.php:201 msgctxt "console" msgid "Exited" msgstr "" -#: Console/Command/SchedulerAction.php:203 +#: Console/Command/SchedulerAction.php:202 msgctxt "console" msgid "Stopped" msgstr "" -#: Console/Command/SchedulerAction.php:204 +#: Console/Command/SchedulerAction.php:203 msgctxt "console" msgid "Failure" msgstr "" -#: Console/Command/SchedulerAction.php:235 -#: Console/Command/SchedulerAction.php:237 -#: Console/Command/SchedulerAction.php:284 -#: Console/Command/SchedulerAction.php:318 -#: Console/Command/SchedulerAction.php:364 +#: Console/Command/SchedulerAction.php:234 +#: Console/Command/SchedulerAction.php:236 +#: Console/Command/SchedulerAction.php:283 +#: Console/Command/SchedulerAction.php:317 +#: Console/Command/SchedulerAction.php:363 msgctxt "console" msgid "Skipped" msgstr "" -#: Console/Command/SchedulerAction.php:263 +#: Console/Command/SchedulerAction.php:262 msgctxt "console" msgid "Next Run Date" msgstr "" -#: Console/Command/SchedulerAction.php:285 -#: Console/Command/SchedulerAction.php:371 +#: Console/Command/SchedulerAction.php:284 +#: Console/Command/SchedulerAction.php:370 msgctxt "console" msgid "Need To Execute" msgstr "" -#: Console/Command/SchedulerAction.php:300 -#: Console/Command/SchedulerAction.php:378 +#: Console/Command/SchedulerAction.php:299 +#: Console/Command/SchedulerAction.php:377 msgctxt "console" msgid "Finished" msgstr "" -#: Console/Command/SchedulerAction.php:326 +#: Console/Command/SchedulerAction.php:325 msgctxt "console" msgid "No Schedulers Registered" msgstr "" -#: Console/Command/SchedulerAction.php:341 +#: Console/Command/SchedulerAction.php:340 msgctxt "console" msgid "Total" msgstr "" -#: Console/Command/SchedulerAction.php:350 +#: Console/Command/SchedulerAction.php:349 msgctxt "console" msgid "Using Timezone" msgstr "" -#: Console/Command/SchedulerAction.php:357 +#: Console/Command/SchedulerAction.php:356 msgctxt "console" msgid "Timezone Offset" msgstr "" -#: Console/Command/SchedulerGenerator.php:83 +#: Console/Command/SchedulerGenerator.php:82 msgctxt "console" msgid "Generate scheduler class." msgstr "" -#: Console/Command/SchedulerGenerator.php:94 +#: Console/Command/SchedulerGenerator.php:93 #, php-format msgctxt "console" msgid "" @@ -1780,23 +1780,23 @@ msgid "" "\n" msgstr "" -#: Console/Command/SchedulerGenerator.php:178 +#: Console/Command/SchedulerGenerator.php:177 msgctxt "console" msgid "Please enter scheduler class name" msgstr "" -#: Console/Command/SchedulerGenerator.php:185 +#: Console/Command/SchedulerGenerator.php:184 msgctxt "console" msgid "Please enter valid scheduler class name!" msgstr "" -#: Console/Command/SchedulerGenerator.php:196 +#: Console/Command/SchedulerGenerator.php:195 #, php-format msgctxt "console" msgid "Scheduler [%s] is invalid! class name contain reserved keyword!" msgstr "" -#: Console/Command/SchedulerGenerator.php:207 +#: Console/Command/SchedulerGenerator.php:206 #, php-format msgctxt "console" msgid "" @@ -1804,55 +1804,55 @@ msgid "" "namespaced!" msgstr "" -#: Console/Command/SchedulerGenerator.php:218 +#: Console/Command/SchedulerGenerator.php:217 #, php-format msgctxt "console" msgid "Scheduler [%s] is too long! Must be less or equal 128 characters" msgstr "" -#: Console/Command/SchedulerGenerator.php:229 +#: Console/Command/SchedulerGenerator.php:228 #, php-format msgctxt "console" msgid "Scheduler [%s] exist" msgstr "" -#: Console/Command/SchedulerGenerator.php:264 +#: Console/Command/SchedulerGenerator.php:263 #, php-format msgctxt "console" msgid "%s Could not detect scheduler directory" msgstr "" -#: Console/Command/SchedulerGenerator.php:306 +#: Console/Command/SchedulerGenerator.php:305 #, php-format msgctxt "console" msgid "Scheduler Name : %s" msgstr "" -#: Console/Command/SchedulerGenerator.php:318 +#: Console/Command/SchedulerGenerator.php:317 #, php-format msgctxt "console" msgid "Scheduler Identity : %s" msgstr "" -#: Console/Command/SchedulerGenerator.php:331 +#: Console/Command/SchedulerGenerator.php:330 #, php-format msgctxt "console" msgid "Scheduler Class : %s" msgstr "" -#: Console/Command/SchedulerGenerator.php:343 +#: Console/Command/SchedulerGenerator.php:342 #, php-format msgctxt "console" msgid "Scheduler File : %s" msgstr "" -#: Console/Command/SchedulerGenerator.php:392 +#: Console/Command/SchedulerGenerator.php:391 #, php-format msgctxt "console" msgid "%s Could not save scheduler!" msgstr "" -#: Console/Command/SchedulerGenerator.php:403 +#: Console/Command/SchedulerGenerator.php:402 #, php-format msgctxt "console" msgid "%s Scheduler successfully created!" @@ -1888,78 +1888,78 @@ msgctxt "template" msgid "unknown" msgstr "" -#: Uploader/Chunk.php:132 +#: Uploader/Chunk.php:144 msgctxt "chunk-uploader" msgid "Storage directory could not be empty or whitespace only." msgstr "" -#: Uploader/Chunk.php:142 +#: Uploader/Chunk.php:154 #, php-format msgctxt "chunk-uploader" msgid "Directory %s is not exist" msgstr "" -#: Uploader/Chunk.php:154 +#: Uploader/Chunk.php:166 #, php-format msgctxt "chunk-uploader" msgid "Directory %s is not writable" msgstr "" -#: Uploader/ChunkHandler.php:116 Uploader/ChunkProcessor.php:223 +#: Uploader/ChunkHandler.php:119 Uploader/ChunkProcessor.php:223 #, php-format msgctxt "chunk-uploader" msgid "Request id \"%s\" is not valid" msgstr "" -#: Uploader/ChunkHandler.php:224 +#: Uploader/ChunkHandler.php:227 msgctxt "chunk-uploader" msgid "Cache upload storage is not writable." msgstr "" -#: Uploader/ChunkHandler.php:276 +#: Uploader/ChunkHandler.php:280 msgctxt "chunk-uploader" msgid "Upload cache file is not writable." msgstr "" -#: Uploader/ChunkHandler.php:290 +#: Uploader/ChunkHandler.php:294 msgctxt "chunk-uploader" msgid "Can not create cached stream." msgstr "" -#: Uploader/ChunkHandler.php:301 +#: Uploader/ChunkHandler.php:305 msgctxt "chunk-uploader" msgid "Cache file has been locked." msgstr "" -#: Uploader/ChunkHandler.php:395 +#: Uploader/ChunkHandler.php:417 msgctxt "chunk-uploader" msgid "Offset upload position is invalid." msgstr "" -#: Uploader/ChunkHandler.php:427 +#: Uploader/ChunkHandler.php:451 msgctxt "chunk-uploader" msgid "Source uploaded file does not exist." msgstr "" -#: Uploader/ChunkHandler.php:447 +#: Uploader/ChunkHandler.php:471 #, php-format msgctxt "chunk-uploader" msgid "Upload cache file is not ready to move : (%d)." msgstr "" -#: Uploader/ChunkHandler.php:496 +#: Uploader/ChunkHandler.php:520 #, php-format msgctxt "chunk-uploader" msgid "Target file \"%s\" is not writable." msgstr "" -#: Uploader/ChunkHandler.php:516 +#: Uploader/ChunkHandler.php:540 #, php-format msgctxt "chunk-uploader" msgid "Target directory \"%s\" is not writable." msgstr "" -#: Uploader/ChunkProcessor.php:46 +#: Uploader/ChunkProcessor.php:45 msgctxt "chunk-uploader" msgid "Uploaded files does not contain file name." msgstr "" @@ -1998,17 +1998,17 @@ msgctxt "chunk-uploader" msgid "Content-Range start bytes must be zero without Request-Id." msgstr "" -#: Uploader/ChunkProcessor.php:234 +#: Uploader/ChunkProcessor.php:235 msgctxt "chunk-uploader" msgid "Content-Range start bytes must be greater zero with Request-Id." msgstr "" -#: Uploader/ChunkProcessor.php:246 +#: Uploader/ChunkProcessor.php:247 msgctxt "chunk-uploader" msgid "Uploaded file size is bigger than ending size." msgstr "" -#: Uploader/ChunkProcessor.php:255 +#: Uploader/ChunkProcessor.php:256 msgctxt "chunk-uploader" msgid "Range size is bigger than file size." msgstr "" diff --git a/src/Lang/id.po b/src/Lang/id.po index 08dbda1..a30642b 100644 --- a/src/Lang/id.po +++ b/src/Lang/id.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: TrayDigita 1.0.0\n" -"POT-Creation-Date: 2023-10-19 21:21+0700\n" -"PO-Revision-Date: 2023-10-19 21:21+0700\n" +"POT-Creation-Date: 2023-10-21 03:07+0700\n" +"PO-Revision-Date: 2023-10-21 03:07+0700\n" "Last-Translator: \n" "Language-Team: ArrayAccess\n" "Language: id\n" @@ -648,11 +648,11 @@ msgstr "Berkas akan diletakkan pada direktori: %s" #: Console/Command/ControllerGenerator.php:296 #: Console/Command/DatabaseChecker.php:1255 #: Console/Command/DatabaseChecker.php:1397 -#: Console/Command/DatabaseEventGenerator.php:331 +#: Console/Command/DatabaseEventGenerator.php:330 #: Console/Command/EntityGenerator.php:327 -#: Console/Command/MiddlewareGenerator.php:328 +#: Console/Command/MiddlewareGenerator.php:327 #: Console/Command/ModuleGenerator.php:347 -#: Console/Command/SchedulerGenerator.php:355 +#: Console/Command/SchedulerGenerator.php:354 msgctxt "console" msgid "Are you sure to continue (Yes/No)?" msgstr "Apakah anda yakin ingin melanjutkan (Yes/No)?" @@ -662,11 +662,11 @@ msgstr "Apakah anda yakin ingin melanjutkan (Yes/No)?" #: Console/Command/ControllerGenerator.php:309 #: Console/Command/DatabaseChecker.php:1270 #: Console/Command/DatabaseChecker.php:1412 -#: Console/Command/DatabaseEventGenerator.php:344 +#: Console/Command/DatabaseEventGenerator.php:343 #: Console/Command/EntityGenerator.php:340 -#: Console/Command/MiddlewareGenerator.php:343 +#: Console/Command/MiddlewareGenerator.php:342 #: Console/Command/ModuleGenerator.php:362 -#: Console/Command/SchedulerGenerator.php:368 +#: Console/Command/SchedulerGenerator.php:367 msgctxt "console" msgid "Please enter valid answer! (Yes / No)" msgstr "Mohon masukkan jawaban yang benar! (Yes/No)" @@ -676,11 +676,11 @@ msgstr "Mohon masukkan jawaban yang benar! (Yes/No)" #: Console/Command/ControllerGenerator.php:351 #: Console/Command/DatabaseChecker.php:1282 #: Console/Command/DatabaseChecker.php:1426 -#: Console/Command/DatabaseEventGenerator.php:388 +#: Console/Command/DatabaseEventGenerator.php:387 #: Console/Command/EntityGenerator.php:385 -#: Console/Command/MiddlewareGenerator.php:387 +#: Console/Command/MiddlewareGenerator.php:386 #: Console/Command/ModuleGenerator.php:406 -#: Console/Command/SchedulerGenerator.php:414 +#: Console/Command/SchedulerGenerator.php:413 msgctxt "console" msgid "Operation cancelled!" msgstr "Operasi dibatalkan!" @@ -702,11 +702,11 @@ msgstr "Hasilkan kelas perintah." #: Console/Command/CommandGenerator.php:87 #: Console/Command/ControllerGenerator.php:90 -#: Console/Command/DatabaseEventGenerator.php:91 +#: Console/Command/DatabaseEventGenerator.php:90 #: Console/Command/EntityGenerator.php:86 -#: Console/Command/MiddlewareGenerator.php:88 +#: Console/Command/MiddlewareGenerator.php:87 #: Console/Command/ModuleGenerator.php:86 -#: Console/Command/SchedulerGenerator.php:89 +#: Console/Command/SchedulerGenerator.php:88 msgctxt "console" msgid "Print generated class file only" msgstr "Tampilkan berkas kelas yang dihasilkan saja" @@ -773,11 +773,11 @@ msgstr "%s Tidak dapat mendeteksi direktori perintah" #: Console/Command/CommandGenerator.php:272 #: Console/Command/ControllerGenerator.php:242 -#: Console/Command/DatabaseEventGenerator.php:271 +#: Console/Command/DatabaseEventGenerator.php:270 #: Console/Command/EntityGenerator.php:255 -#: Console/Command/MiddlewareGenerator.php:267 +#: Console/Command/MiddlewareGenerator.php:266 #: Console/Command/ModuleGenerator.php:271 -#: Console/Command/SchedulerGenerator.php:278 +#: Console/Command/SchedulerGenerator.php:277 #, php-format msgctxt "console" msgid "%s generator only support in interactive mode" @@ -1232,12 +1232,12 @@ msgid "Database password" msgstr "Kata sandi basis data" #: Console/Command/DatabaseChecker.php:1695 -#: Console/Command/SchedulerAction.php:121 -#: Console/Command/SchedulerAction.php:205 -#: Console/Command/SchedulerAction.php:216 -#: Console/Command/SchedulerAction.php:228 -#: Console/Command/SchedulerAction.php:276 -#: Console/Command/SchedulerAction.php:311 +#: Console/Command/SchedulerAction.php:120 +#: Console/Command/SchedulerAction.php:204 +#: Console/Command/SchedulerAction.php:215 +#: Console/Command/SchedulerAction.php:227 +#: Console/Command/SchedulerAction.php:275 +#: Console/Command/SchedulerAction.php:310 msgctxt "console" msgid "Unknown" msgstr "Tidak diketahui" @@ -1323,12 +1323,12 @@ msgid "Contains changed database schema, you can check with command :" msgstr "" "Berisi skema database yang diubah, anda dapat memeriksanya dengan perintah :" -#: Console/Command/DatabaseEventGenerator.php:85 +#: Console/Command/DatabaseEventGenerator.php:84 msgctxt "console" msgid "Generate database event class." msgstr "Hasilkan kelas event basis data." -#: Console/Command/DatabaseEventGenerator.php:96 +#: Console/Command/DatabaseEventGenerator.php:95 #, php-format msgctxt "console" msgid "" @@ -1342,23 +1342,23 @@ msgstr "" "Peristiwa Basis Data akan menggunakan awalan namespace dengan %s\n" "Basis Data Event hanya mendukung satu nama kelas." -#: Console/Command/DatabaseEventGenerator.php:180 +#: Console/Command/DatabaseEventGenerator.php:179 msgctxt "console" msgid "Please enter database event class name" msgstr "Silakan masukkan nama kelas basis data event" -#: Console/Command/DatabaseEventGenerator.php:186 +#: Console/Command/DatabaseEventGenerator.php:185 msgctxt "console" msgid "Please enter valid database event class name!" msgstr "Silakan masukkan nama kelas basis data event yang sah!" -#: Console/Command/DatabaseEventGenerator.php:195 +#: Console/Command/DatabaseEventGenerator.php:194 #, php-format msgctxt "console" msgid "Event [%s] is invalid! class name contain reserved keyword!" msgstr "Acara [%s] tidak valid! nama kelas berisi kata kunci bawaan!" -#: Console/Command/DatabaseEventGenerator.php:206 +#: Console/Command/DatabaseEventGenerator.php:205 #, php-format msgctxt "console" msgid "" @@ -1368,7 +1368,7 @@ msgstr "" "Event [%s] tidak sah! Basis data event hanya boleh berupa nama kelas " "tunggal, bukan bermuatan namespace!" -#: Console/Command/DatabaseEventGenerator.php:217 +#: Console/Command/DatabaseEventGenerator.php:216 #, php-format msgctxt "console" msgid "Database event [%s] is too long! Must be less or equal 128 characters" @@ -1376,43 +1376,43 @@ msgstr "" "Event basis data [%s] terlalu panjang! Harus kurang dari atau sama dengan " "128 karakter" -#: Console/Command/DatabaseEventGenerator.php:227 +#: Console/Command/DatabaseEventGenerator.php:226 #, php-format msgctxt "console" msgid "Database event [%s] exist" msgstr "Database event [%s] tersedia" -#: Console/Command/DatabaseEventGenerator.php:257 +#: Console/Command/DatabaseEventGenerator.php:256 #, php-format msgctxt "console" msgid "%s Could not detect database event directory" msgstr "%s Tidak dapat mendeteksi direktori basis data acara" -#: Console/Command/DatabaseEventGenerator.php:294 +#: Console/Command/DatabaseEventGenerator.php:293 #, php-format msgctxt "console" msgid "Database Event Name : %s" msgstr "Nama Event Basis Data: %s" -#: Console/Command/DatabaseEventGenerator.php:307 +#: Console/Command/DatabaseEventGenerator.php:306 #, php-format msgctxt "console" msgid "DatabaseEvent Class : %s" msgstr "Kelas DatabaseEvent : %s" -#: Console/Command/DatabaseEventGenerator.php:319 +#: Console/Command/DatabaseEventGenerator.php:318 #, php-format msgctxt "console" msgid "DatabaseEvent File : %s" msgstr "Berkas DatabaseEvent : %s" -#: Console/Command/DatabaseEventGenerator.php:366 +#: Console/Command/DatabaseEventGenerator.php:365 #, php-format msgctxt "console" msgid "%s Could not save databaseEvent!" msgstr "%s Tidak dapat menyimpan databaseEvent!" -#: Console/Command/DatabaseEventGenerator.php:377 +#: Console/Command/DatabaseEventGenerator.php:376 #, php-format msgctxt "console" msgid "%s DatabaseEvent successfully created!" @@ -1507,12 +1507,12 @@ msgctxt "console" msgid "%s Entity successfully created!" msgstr "%s Entitas berhasil dibuat!" -#: Console/Command/MiddlewareGenerator.php:82 +#: Console/Command/MiddlewareGenerator.php:81 msgctxt "console" msgid "Generate middleware class." msgstr "Hasilkan kelas middleware." -#: Console/Command/MiddlewareGenerator.php:93 +#: Console/Command/MiddlewareGenerator.php:92 #, php-format msgctxt "console" msgid "" @@ -1524,17 +1524,17 @@ msgstr "" "\n" "Middleware akan menggunakan awalan namespace dengan %s\n" -#: Console/Command/MiddlewareGenerator.php:177 +#: Console/Command/MiddlewareGenerator.php:176 msgctxt "console" msgid "Please enter middleware class name" msgstr "Mohon masukkan nama kelas middleware" -#: Console/Command/MiddlewareGenerator.php:186 +#: Console/Command/MiddlewareGenerator.php:185 msgctxt "console" msgid "Please enter valid middleware class name!" msgstr "Silakan masukkan nama kelas middleware yang sah!" -#: Console/Command/MiddlewareGenerator.php:194 +#: Console/Command/MiddlewareGenerator.php:193 #, php-format msgctxt "console" msgid "" @@ -1544,49 +1544,49 @@ msgstr "" "Middleware [%s] tidak sah! middleware hanya boleh berupa nama kelas tunggal, " "bukan bermuatan namespace!" -#: Console/Command/MiddlewareGenerator.php:208 +#: Console/Command/MiddlewareGenerator.php:207 #, php-format msgctxt "console" msgid "Middleware [%s] is invalid! class name contain reserved keyword!" msgstr "Middleware [%s] tidak sah! nama kelas berisi kata kunci bawaan!" -#: Console/Command/MiddlewareGenerator.php:219 +#: Console/Command/MiddlewareGenerator.php:218 #, php-format msgctxt "console" msgid "Middleware [%s] exist" msgstr "Middleware [%s] tersedia" -#: Console/Command/MiddlewareGenerator.php:253 +#: Console/Command/MiddlewareGenerator.php:252 #, php-format msgctxt "console" msgid "%s Could not detect middleware directory" msgstr "%s Tidak dapat mendeteksi direktori middleware" -#: Console/Command/MiddlewareGenerator.php:289 +#: Console/Command/MiddlewareGenerator.php:288 #, php-format msgctxt "console" msgid "Middleware Name : %s" msgstr "Nama Middleware : %s" -#: Console/Command/MiddlewareGenerator.php:303 +#: Console/Command/MiddlewareGenerator.php:302 #, php-format msgctxt "console" msgid "Middleware Class : %s" msgstr "Kelas Middleware: %s" -#: Console/Command/MiddlewareGenerator.php:315 +#: Console/Command/MiddlewareGenerator.php:314 #, php-format msgctxt "console" msgid "Middleware File : %s" msgstr "Berkas Middleware : %s" -#: Console/Command/MiddlewareGenerator.php:365 +#: Console/Command/MiddlewareGenerator.php:364 #, php-format msgctxt "console" msgid "%s Could not save middleware!" msgstr "%s Tidak dapat menyimpan middleware!" -#: Console/Command/MiddlewareGenerator.php:376 +#: Console/Command/MiddlewareGenerator.php:375 #, php-format msgctxt "console" msgid "%s Middleware successfully created!" @@ -1692,144 +1692,144 @@ msgctxt "console" msgid "%s Module successfully created!" msgstr "%s Modul berhasil dibuat!" -#: Console/Command/SchedulerAction.php:50 +#: Console/Command/SchedulerAction.php:49 msgctxt "console" msgid "List or run scheduler." msgstr "Daftar atau jalankan penjadwal." -#: Console/Command/SchedulerAction.php:57 +#: Console/Command/SchedulerAction.php:56 msgctxt "console" msgid "Run the pending schedulers" msgstr "Jalankan penjadwal yang tertunda" -#: Console/Command/SchedulerAction.php:63 +#: Console/Command/SchedulerAction.php:62 #, php-format msgctxt "console" msgid "The %s help you to list & run scheduler" msgstr "%s membantu anda untuk membuat daftar & menjalankan penjadwal" -#: Console/Command/SchedulerAction.php:85 +#: Console/Command/SchedulerAction.php:84 msgctxt "console" msgid "Object scheduler is not valid" msgstr "Object penjadwal tidak sah" -#: Console/Command/SchedulerAction.php:109 -#: Console/Command/SchedulerAction.php:259 +#: Console/Command/SchedulerAction.php:108 +#: Console/Command/SchedulerAction.php:258 msgctxt "console" msgid "Id" msgstr "Id" -#: Console/Command/SchedulerAction.php:110 -#: Console/Command/SchedulerAction.php:260 +#: Console/Command/SchedulerAction.php:109 +#: Console/Command/SchedulerAction.php:259 msgctxt "console" msgid "Name" msgstr "Nama" -#: Console/Command/SchedulerAction.php:111 -#: Console/Command/SchedulerAction.php:261 +#: Console/Command/SchedulerAction.php:110 +#: Console/Command/SchedulerAction.php:260 msgctxt "console" msgid "Status" msgstr "Status" -#: Console/Command/SchedulerAction.php:112 -#: Console/Command/SchedulerAction.php:262 +#: Console/Command/SchedulerAction.php:111 +#: Console/Command/SchedulerAction.php:261 msgctxt "console" msgid "Last Execution" msgstr "Eksekusi Terakhir" -#: Console/Command/SchedulerAction.php:113 +#: Console/Command/SchedulerAction.php:112 msgctxt "console" msgid "Execution Time" msgstr "Waktu Eksekusi" -#: Console/Command/SchedulerAction.php:117 +#: Console/Command/SchedulerAction.php:116 msgctxt "console" msgid "Waiting" msgstr "Menunggu" -#: Console/Command/SchedulerAction.php:136 +#: Console/Command/SchedulerAction.php:135 msgctxt "console" msgid "No Schedulers Waiting For Execution" msgstr "Tidak Ada Penjadwal yang Menunggu Eksekusi" -#: Console/Command/SchedulerAction.php:154 +#: Console/Command/SchedulerAction.php:153 msgctxt "console" msgid "Are you sure to execute scheduler ?" msgid_plural "Are you sure to execute schedulers ?" msgstr[0] "Apakah Anda yakin untuk menjalankan penjadwal?" -#: Console/Command/SchedulerAction.php:201 +#: Console/Command/SchedulerAction.php:200 msgctxt "console" msgid "Success" msgstr "Berhasil" -#: Console/Command/SchedulerAction.php:202 +#: Console/Command/SchedulerAction.php:201 msgctxt "console" msgid "Exited" msgstr "Keluar" -#: Console/Command/SchedulerAction.php:203 +#: Console/Command/SchedulerAction.php:202 msgctxt "console" msgid "Stopped" msgstr "Dihentikan" -#: Console/Command/SchedulerAction.php:204 +#: Console/Command/SchedulerAction.php:203 msgctxt "console" msgid "Failure" msgstr "Kegagalan" -#: Console/Command/SchedulerAction.php:235 -#: Console/Command/SchedulerAction.php:237 -#: Console/Command/SchedulerAction.php:284 -#: Console/Command/SchedulerAction.php:318 -#: Console/Command/SchedulerAction.php:364 +#: Console/Command/SchedulerAction.php:234 +#: Console/Command/SchedulerAction.php:236 +#: Console/Command/SchedulerAction.php:283 +#: Console/Command/SchedulerAction.php:317 +#: Console/Command/SchedulerAction.php:363 msgctxt "console" msgid "Skipped" msgstr "Dilewati" -#: Console/Command/SchedulerAction.php:263 +#: Console/Command/SchedulerAction.php:262 msgctxt "console" msgid "Next Run Date" msgstr "Tanggal Pengoperasian Berikutnya" -#: Console/Command/SchedulerAction.php:285 -#: Console/Command/SchedulerAction.php:371 +#: Console/Command/SchedulerAction.php:284 +#: Console/Command/SchedulerAction.php:370 msgctxt "console" msgid "Need To Execute" msgstr "Perlu Dieksekusi" -#: Console/Command/SchedulerAction.php:300 -#: Console/Command/SchedulerAction.php:378 +#: Console/Command/SchedulerAction.php:299 +#: Console/Command/SchedulerAction.php:377 msgctxt "console" msgid "Finished" msgstr "Diselesaikan" -#: Console/Command/SchedulerAction.php:326 +#: Console/Command/SchedulerAction.php:325 msgctxt "console" msgid "No Schedulers Registered" msgstr "Tidak Ada Penjadwal Terdaftar" -#: Console/Command/SchedulerAction.php:341 +#: Console/Command/SchedulerAction.php:340 msgctxt "console" msgid "Total" msgstr "Total" -#: Console/Command/SchedulerAction.php:350 +#: Console/Command/SchedulerAction.php:349 msgctxt "console" msgid "Using Timezone" msgstr "Menggunakan Zona Waktu" -#: Console/Command/SchedulerAction.php:357 +#: Console/Command/SchedulerAction.php:356 msgctxt "console" msgid "Timezone Offset" msgstr "Pengimbangan Zona Waktu" -#: Console/Command/SchedulerGenerator.php:83 +#: Console/Command/SchedulerGenerator.php:82 msgctxt "console" msgid "Generate scheduler class." msgstr "Hasilkan kelas penjadwal." -#: Console/Command/SchedulerGenerator.php:94 +#: Console/Command/SchedulerGenerator.php:93 #, php-format msgctxt "console" msgid "" @@ -1845,23 +1845,23 @@ msgstr "" "Penjadwal hanya mendukung nama kelas tunggal.\n" "\n" -#: Console/Command/SchedulerGenerator.php:178 +#: Console/Command/SchedulerGenerator.php:177 msgctxt "console" msgid "Please enter scheduler class name" msgstr "Mohon masukkan nama kelas penjadwal" -#: Console/Command/SchedulerGenerator.php:185 +#: Console/Command/SchedulerGenerator.php:184 msgctxt "console" msgid "Please enter valid scheduler class name!" msgstr "Mohon masukkan nama kelas penjadwal yang sah!" -#: Console/Command/SchedulerGenerator.php:196 +#: Console/Command/SchedulerGenerator.php:195 #, php-format msgctxt "console" msgid "Scheduler [%s] is invalid! class name contain reserved keyword!" msgstr "Penjadwal [%s] tidak valid! nama kelas berisi kata kunci bawaan!" -#: Console/Command/SchedulerGenerator.php:207 +#: Console/Command/SchedulerGenerator.php:206 #, php-format msgctxt "console" msgid "" @@ -1871,7 +1871,7 @@ msgstr "" "Penjadwal [%s] tidak sah! Penjadwal hanya boleh berupa nama kelas tunggal, " "bukan bermuatan namespace!" -#: Console/Command/SchedulerGenerator.php:218 +#: Console/Command/SchedulerGenerator.php:217 #, php-format msgctxt "console" msgid "Scheduler [%s] is too long! Must be less or equal 128 characters" @@ -1879,49 +1879,49 @@ msgstr "" "Penjadwal [%s] terlalu panjang! Harus kurang dari atau sama dengan 128 " "karakter" -#: Console/Command/SchedulerGenerator.php:229 +#: Console/Command/SchedulerGenerator.php:228 #, php-format msgctxt "console" msgid "Scheduler [%s] exist" msgstr "Penjadwal [%s] tersedia" -#: Console/Command/SchedulerGenerator.php:264 +#: Console/Command/SchedulerGenerator.php:263 #, php-format msgctxt "console" msgid "%s Could not detect scheduler directory" msgstr "%s Tidak dapat mendeteksi direktori penjadwal" -#: Console/Command/SchedulerGenerator.php:306 +#: Console/Command/SchedulerGenerator.php:305 #, php-format msgctxt "console" msgid "Scheduler Name : %s" msgstr "Nama Penjadwal : %s" -#: Console/Command/SchedulerGenerator.php:318 +#: Console/Command/SchedulerGenerator.php:317 #, php-format msgctxt "console" msgid "Scheduler Identity : %s" msgstr "Identitas Penjadwal : %s" -#: Console/Command/SchedulerGenerator.php:331 +#: Console/Command/SchedulerGenerator.php:330 #, php-format msgctxt "console" msgid "Scheduler Class : %s" msgstr "Kelas Penjadwal : %s" -#: Console/Command/SchedulerGenerator.php:343 +#: Console/Command/SchedulerGenerator.php:342 #, php-format msgctxt "console" msgid "Scheduler File : %s" msgstr "Berkas Penjadwal : %s" -#: Console/Command/SchedulerGenerator.php:392 +#: Console/Command/SchedulerGenerator.php:391 #, php-format msgctxt "console" msgid "%s Could not save scheduler!" msgstr "%s Tidak dapat menyimpan penjadwal!" -#: Console/Command/SchedulerGenerator.php:403 +#: Console/Command/SchedulerGenerator.php:402 #, php-format msgctxt "console" msgid "%s Scheduler successfully created!" @@ -1956,78 +1956,78 @@ msgctxt "template" msgid "unknown" msgstr "tak diketahui" -#: Uploader/Chunk.php:132 +#: Uploader/Chunk.php:144 msgctxt "chunk-uploader" msgid "Storage directory could not be empty or whitespace only." msgstr "Direktori penyimpanan tidak dapat kosong atau berupa whitespace saja." -#: Uploader/Chunk.php:142 +#: Uploader/Chunk.php:154 #, php-format msgctxt "chunk-uploader" msgid "Directory %s is not exist" msgstr "Direktori %s tidak ada" -#: Uploader/Chunk.php:154 +#: Uploader/Chunk.php:166 #, php-format msgctxt "chunk-uploader" msgid "Directory %s is not writable" msgstr "Direktori %s tidak dapat ditulisi" -#: Uploader/ChunkHandler.php:116 Uploader/ChunkProcessor.php:223 +#: Uploader/ChunkHandler.php:119 Uploader/ChunkProcessor.php:223 #, php-format msgctxt "chunk-uploader" msgid "Request id \"%s\" is not valid" msgstr "Request id \"%s\" tidak sah" -#: Uploader/ChunkHandler.php:224 +#: Uploader/ChunkHandler.php:227 msgctxt "chunk-uploader" msgid "Cache upload storage is not writable." msgstr "Direktori penyimpanan cache tidak dapat ditulisi." -#: Uploader/ChunkHandler.php:276 +#: Uploader/ChunkHandler.php:280 msgctxt "chunk-uploader" msgid "Upload cache file is not writable." msgstr "Berkas cache unggahan tidak dapat ditulisi." -#: Uploader/ChunkHandler.php:290 +#: Uploader/ChunkHandler.php:294 msgctxt "chunk-uploader" msgid "Can not create cached stream." msgstr "Tidak dapat membuat cached stream." -#: Uploader/ChunkHandler.php:301 +#: Uploader/ChunkHandler.php:305 msgctxt "chunk-uploader" msgid "Cache file has been locked." msgstr "Berkas cache terkunci." -#: Uploader/ChunkHandler.php:395 +#: Uploader/ChunkHandler.php:417 msgctxt "chunk-uploader" msgid "Offset upload position is invalid." msgstr "Posisi offset unggahan tidak sah." -#: Uploader/ChunkHandler.php:427 +#: Uploader/ChunkHandler.php:451 msgctxt "chunk-uploader" msgid "Source uploaded file does not exist." msgstr "Berkas sumber yang diunggah tidak ada." -#: Uploader/ChunkHandler.php:447 +#: Uploader/ChunkHandler.php:471 #, php-format msgctxt "chunk-uploader" msgid "Upload cache file is not ready to move : (%d)." msgstr "Berkas cache yang diunggah belum siap dipindahkan : (%d)." -#: Uploader/ChunkHandler.php:496 +#: Uploader/ChunkHandler.php:520 #, php-format msgctxt "chunk-uploader" msgid "Target file \"%s\" is not writable." msgstr "Berkas tujuan \"%s\" tidak dapat ditulisi." -#: Uploader/ChunkHandler.php:516 +#: Uploader/ChunkHandler.php:540 #, php-format msgctxt "chunk-uploader" msgid "Target directory \"%s\" is not writable." msgstr "Direktori tujuan \"%s\" tidak dapat ditulisi." -#: Uploader/ChunkProcessor.php:46 +#: Uploader/ChunkProcessor.php:45 msgctxt "chunk-uploader" msgid "Uploaded files does not contain file name." msgstr "Berkas terunggah tidak mempunyai nama berkas." @@ -2069,17 +2069,17 @@ msgctxt "chunk-uploader" msgid "Content-Range start bytes must be zero without Request-Id." msgstr "Content-Range byte awal harus nol atau tanpa Request-Id." -#: Uploader/ChunkProcessor.php:234 +#: Uploader/ChunkProcessor.php:235 msgctxt "chunk-uploader" msgid "Content-Range start bytes must be greater zero with Request-Id." msgstr "Content-Range awal harus lebih besar dari nol dengan Id Permintaan." -#: Uploader/ChunkProcessor.php:246 +#: Uploader/ChunkProcessor.php:247 msgctxt "chunk-uploader" msgid "Uploaded file size is bigger than ending size." msgstr "Ukuran berkas yang diunggah lebih besar dari ukuran akhir." -#: Uploader/ChunkProcessor.php:255 +#: Uploader/ChunkProcessor.php:256 msgctxt "chunk-uploader" msgid "Range size is bigger than file size." msgstr "Ukuran rentang lebih besar dari ukuran berkas." diff --git a/src/Responder/HtmlResponder.php b/src/Responder/HtmlResponder.php index 2697085..bf41ef0 100644 --- a/src/Responder/HtmlResponder.php +++ b/src/Responder/HtmlResponder.php @@ -124,15 +124,18 @@ public function serve(int $code, mixed $data = null, ?ResponseInterface $respons } $body->write($this->format($code, $data)); + return $this->appendContentType( + $response->withStatus($code)->withBody($body) + ); + } + + public function appendContentType(ResponseInterface $response) : ResponseInterface + { $contentType = $this->getContentType(); $charset = $this->getCharset(); if ($charset) { $contentType .= sprintf('; charset=%s', $charset); } - - return $response - ->withStatus($code) - ->withHeader('Content-Type', $contentType) - ->withBody($body); + return $response->withHeader('Content-Type', $contentType); } } diff --git a/src/Responder/Interfaces/ResponderInterface.php b/src/Responder/Interfaces/ResponderInterface.php index b854477..2838eca 100644 --- a/src/Responder/Interfaces/ResponderInterface.php +++ b/src/Responder/Interfaces/ResponderInterface.php @@ -18,4 +18,6 @@ public function getContentType() : string; public function getCharset() : ?string; public function serve(int $code, mixed $data = null, ?ResponseInterface $response = null) : ResponseInterface; + + public function appendContentType(ResponseInterface $response) : ResponseInterface; } diff --git a/src/Responder/JsonResponder.php b/src/Responder/JsonResponder.php index d4fad2b..8c093c1 100644 --- a/src/Responder/JsonResponder.php +++ b/src/Responder/JsonResponder.php @@ -282,15 +282,19 @@ public function serve( $body = $this->getStreamFactory()->createStream(); } $body->write($this->encode($this->format($code, $data, $forceDebug))); + return $this->appendContentType( + $response->withStatus($code)->withBody($body) + ); + } + + public function appendContentType(ResponseInterface $response) : ResponseInterface + { $contentType = $this->getContentType(); $charset = $this->getCharset(); if ($charset) { $contentType .= sprintf('; charset=%s', $charset); } - return $response - ->withStatus($code) - ->withHeader('Content-Type', $contentType) - ->withBody($body); + return $response->withHeader('Content-Type', $contentType); } public function serveJsonMetadata( diff --git a/src/Routing/AbstractController.php b/src/Routing/AbstractController.php index 780288f..4978ce2 100644 --- a/src/Routing/AbstractController.php +++ b/src/Routing/AbstractController.php @@ -9,6 +9,7 @@ use ArrayAccess\TrayDigita\Http\Code; use ArrayAccess\TrayDigita\Module\Interfaces\ModuleInterface; use ArrayAccess\TrayDigita\Module\Modules; +use ArrayAccess\TrayDigita\Responder\Interfaces\FileResponderInterface; use ArrayAccess\TrayDigita\Routing\Interfaces\ControllerInterface; use ArrayAccess\TrayDigita\Routing\Interfaces\RouteInterface; use ArrayAccess\TrayDigita\Routing\Interfaces\RouterInterface; @@ -29,8 +30,8 @@ use ReflectionMethod; use Stringable; use Throwable; -use function is_array; use function is_int; +use function is_iterable; use function is_object; use function is_string; use function json_decode; @@ -262,12 +263,14 @@ public function dispatch( ) { $statusCode = $this->statusCode; } + if ($response instanceof FileResponderInterface) { + // stop here + $response->send($request); + } if (!$response instanceof ResponseInterface) { $this->response ??= $this->getResponseFactory()->createResponse($statusCode); - if (is_array($response) - || $response instanceof JsonSerializable - ) { + if (is_iterable($response) || $response instanceof JsonSerializable) { $this->response = $this ->getJsonResponder() ->serve( @@ -283,11 +286,8 @@ public function dispatch( flags: JSON_THROW_ON_ERROR ); $this->response = $this - ->response - ->withHeader( - 'Content-Type', - $this->getJsonResponder()->getContentType() - ); + ->getJsonResponder() + ->appendContentType($this->response); } catch (Throwable) { } } @@ -299,26 +299,29 @@ public function dispatch( || is_object($response) && method_exists($response, '__tostring') ) { $response = (string) $response; + $useJson = false; if ($this->asJSON) { try { json_decode( $response, flags: JSON_THROW_ON_ERROR ); - $this->response = $this - ->response - ->withHeader( - 'Content-Type', - $this->getJsonResponder()->getContentType() - ); + $useJson = true; + $body = $this->response->getBody()->isWritable() + ? $this->response->getBody() + : $this->getStreamFactory()->createStream(); + $body->write($response); + $this->response = $this->getJsonResponder()->appendContentType( + $this->response->withBody($body) + ); } catch (Throwable) { } } - $body = $this->response->getBody()->isWritable() - ? $this->response->getBody() - : $this->getStreamFactory()->createStream(); - $body->write($response); - $this->response = $this->response->withBody($body); + if (!$useJson) { + return $this->response = $this + ->getHtmlResponder() + ->serve($statusCode, $response, $this->response); + } } elseif ($this->asJSON) { $this->response = $this ->getJsonResponder() @@ -327,6 +330,10 @@ public function dispatch( $response, $this->response ); + } else { + $this->response = $this + ->getHtmlResponder() + ->serve($statusCode, $response, $this->response); } } else { $this->response = $response; diff --git a/src/Routing/Router.php b/src/Routing/Router.php index bd2a0ae..92c336c 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -702,6 +702,7 @@ public function matchRouteParamByRequest(Route $route, ServerRequestInterface $r if (!str_starts_with($path, $basePath)) { return null; } + $basePath = rtrim($basePath, '/'); $path = substr($path, strlen($basePath)); if ($path === '') { diff --git a/src/Uploader/Chunk.php b/src/Uploader/Chunk.php index ded129b..14b0aaa 100644 --- a/src/Uploader/Chunk.php +++ b/src/Uploader/Chunk.php @@ -85,7 +85,7 @@ class Chunk implements ManagerAllocatorInterface, ContainerIndicateInterface private int $maxUploadFileSize; - private bool $allowRevertPosition = true; + private bool $allowRevertPosition = false; public function __construct( protected ContainerInterface $container, diff --git a/src/Uploader/ChunkHandler.php b/src/Uploader/ChunkHandler.php index 2041181..c3bd6c2 100644 --- a/src/Uploader/ChunkHandler.php +++ b/src/Uploader/ChunkHandler.php @@ -24,6 +24,7 @@ use function is_file; use function is_float; use function is_int; +use function is_numeric; use function is_string; use function json_decode; use function json_encode; @@ -33,6 +34,7 @@ use function sprintf; use function substr; use function unlink; +use function var_dump; use const JSON_UNESCAPED_SLASHES; class ChunkHandler @@ -306,6 +308,10 @@ private function writeResource(string $mode, int $offset) : int ); } + $time = $_SERVER['REQUEST_TIME_FLOAT']??( + $_SERVER['REQUEST_TIME']??null + ); + $time = is_numeric($time) ? (float) $time : microtime(true); $uploadedStream = $this->processor->uploadedFile->getStream(); if ($uploadedStream->isSeekable()) { $uploadedStream->rewind(); @@ -322,8 +328,6 @@ private function writeResource(string $mode, int $offset) : int ) : ($offset + $this->written); flock($this->cacheResource, LOCK_EX); $written = null; - $time = $_SERVER['REQUEST_FLOAT_TIME']??null; - $time = is_float($time) ? $time : microtime(true); if (is_file($this->targetCacheMetaFile)) { $meta = Consolidation::callbackReduceError(fn () => json_decode( file_get_contents($this->targetCacheMetaFile), @@ -340,22 +344,28 @@ private function writeResource(string $mode, int $offset) : int if (!$valid) { Consolidation::callbackReduceError(fn () => unlink($this->targetCacheMetaFile)); } else { + $endTime = microtime(true); $written = $meta; $written['count'] += 1; $written['timing'][] = [ - 'time' => $time, + 'start_time' => $time, + 'end_time' => $endTime, + 'elapsed_time' => $endTime - $time, 'written' => $this->written, 'size' => $this->size ]; } } elseif ($isFirst) { + $endTime = microtime(true); $written = [ 'first_time' => $time, 'mimetype' => $this->processor->uploadedFile->getClientMediaType(), 'count' => 1, 'timing' => [ [ - 'time' => $time, + 'start_time' => $time, + 'end_time' => $endTime, + 'elapsed_time' => $endTime - $time, 'written' => $this->written, 'size' => $this->size ] @@ -390,10 +400,13 @@ public function start(?int $offset = null): int } $mode = 'wb+'; - if ($offset > 0) { + if ($offset > 0 || $offset < 0) { + // offset start from zero + $maxOffset = $this->size > 0 ? ($this->size - 1) : 0; $allowRevertPosition = $this->processor->chunk->isAllowRevertPosition(); - if (!$allowRevertPosition && $offset !== $this->size - || $allowRevertPosition && $offset > $this->size + if ($offset < 0 + || !$allowRevertPosition && $offset !== $maxOffset + || $allowRevertPosition && $offset > $maxOffset ) { // do delete $this->deletePartial(); @@ -407,7 +420,8 @@ public function start(?int $offset = null): int ); } } - + // start offset + $offset = max($offset, 0); $this->status = self::STATUS_RESUME; return $this->writeResource($mode, $offset); } diff --git a/src/Util/Filter/DataType.php b/src/Util/Filter/DataType.php index 8a3fc46..0b8610b 100644 --- a/src/Util/Filter/DataType.php +++ b/src/Util/Filter/DataType.php @@ -61,7 +61,7 @@ public static function isHtmlContentType( return false; } - return (bool)preg_match( + return (bool) preg_match( '~^text/x?html(?:[;\s]|$)~i', trim($contentType) );