Skip to content

Commit

Permalink
Upd: Add start script notification
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed May 17, 2024
1 parent c222300 commit 8e8ef30
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 24 deletions.
28 changes: 14 additions & 14 deletions docs/references/translating_status.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
- bg-BG: 1012 missing phrases
- es-AR: 7 missing phrases
- es-ES: 876 missing phrases
- es-VE: 874 missing phrases
- fi-FI: 871 missing phrases
- fr-FR: 12 missing phrases
- it-IT: 12 missing phrases
- ja-JP: 7 missing phrases
- ko-KR: 7 missing phrases
- nl-NL: 12 missing phrases
- pl-PL: 30 missing phrases
- ru-RU: 104 missing phrases
- zh-Hans: 7 missing phrases
- zh-Hant: 30 missing phrases
- bg-BG: 1020 missing phrases
- es-AR: 15 missing phrases
- es-ES: 884 missing phrases
- es-VE: 882 missing phrases
- fi-FI: 879 missing phrases
- fr-FR: 20 missing phrases
- it-IT: 20 missing phrases
- ja-JP: 15 missing phrases
- ko-KR: 15 missing phrases
- nl-NL: 20 missing phrases
- pl-PL: 38 missing phrases
- ru-RU: 112 missing phrases
- zh-Hans: 15 missing phrases
- zh-Hant: 38 missing phrases
20 changes: 10 additions & 10 deletions src/i18n/json/i18n.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"default": {"desc":"Browser default", "missingPhrases": 0},
"de-DE": {"desc":"Deutsch (de-DE)", "missingPhrases": 0},
"de-DE": {"desc":"Deutsch (de-DE)", "missingPhrases": 8},
"en-US": {"desc":"English (en-US)", "missingPhrases": 0},
"es-AR": {"desc":"Español (es-AR)", "missingPhrases": 7},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 12},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 12},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 7},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 7},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 12},
"pl-PL": {"desc":"Polish (pl-PL)", "missingPhrases": 30},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 7},
"zh-Hant": {"desc":"简体中文 (zh-Hant)", "missingPhrases": 30}
"es-AR": {"desc":"Español (es-AR)", "missingPhrases": 15},
"fr-FR": {"desc":"Français (fr-FR)", "missingPhrases": 20},
"it-IT": {"desc":"Italiano (it-IT)", "missingPhrases": 20},
"ja-JP": {"desc":"日本語 (ja-JP)", "missingPhrases": 15},
"ko-KR": {"desc":"한국어 (ko-KR)", "missingPhrases": 15},
"nl-NL": {"desc":"Nederlands (nl-NL)", "missingPhrases": 20},
"pl-PL": {"desc":"Polish (pl-PL)", "missingPhrases": 38},
"zh-Hans": {"desc":"简体中文 (zh-Hans)", "missingPhrases": 15},
"zh-Hant": {"desc":"简体中文 (zh-Hant)", "missingPhrases": 38}
}
8 changes: 8 additions & 0 deletions src/i18n/json/phrases.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
{"term":"Loglevel set to NOTICE"},
{"term":"Loglevel set to WARN"},
{"term":"Logout"},
{"term":"Logs messages to the myMPD log."},
{"term":"Lookup at musicbrainz"},
{"term":"Love song"},
{"term":"Love, hate"},
Expand Down Expand Up @@ -720,6 +721,8 @@
{"term":"Resize"},
{"term":"Response code: %{code}"},
{"term":"Returns the active state of a GPIO."},
{"term":"SHA1 hash of string."},
{"term":"SHA256 hash of string."},
{"term":"Sat"},
{"term":"Save"},
{"term":"Save as smart playlist"},
Expand All @@ -731,6 +734,7 @@
{"term":"Scale ratio"},
{"term":"Script"},
{"term":"Script %{script} executed successfully"},
{"term":"Script %{script} started"},
{"term":"Script arguments"},
{"term":"Script name"},
{"term":"Script syntax is valid"},
Expand All @@ -751,6 +755,8 @@
{"term":"Select tag to search"},
{"term":"Select view"},
{"term":"Selected"},
{"term":"Sends a HTTP redirect"},
{"term":"Sends a HTTP reply"},
{"term":"Session"},
{"term":"Session removed"},
{"term":"Session successfully created"},
Expand Down Expand Up @@ -898,6 +904,8 @@
{"term":"Tue"},
{"term":"Type"},
{"term":"Type or select picture"},
{"term":"URL decodes a string."},
{"term":"URL encodes a string."},
{"term":"Unknown partition"},
{"term":"Unknown queue save mode"},
{"term":"Unknown request"},
Expand Down
5 changes: 5 additions & 0 deletions src/mympd_api/scripts.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ static void *script_execute_async(void *script_thread_arg) {
populate_lua_global_vars(lua_vm, script_arg);
//execute script
MYMPD_LOG_DEBUG(NULL, "Start script");
sds buffer = jsonrpc_notify_phrase(sdsempty(), JSONRPC_FACILITY_SCRIPT,
JSONRPC_SEVERITY_INFO, "Script %{script} started",
2, "script", script_arg->script_name);
ws_notify(buffer, script_arg->partition);
FREE_SDS(buffer);
rc = lua_pcall(lua_vm, 0, 1, 0);
MYMPD_LOG_DEBUG(NULL, "End script");
}
Expand Down

0 comments on commit 8e8ef30

Please sign in to comment.