DSM7: synodsmnotify how to use i18n format

Currently reading
DSM7: synodsmnotify how to use i18n format

Last edited:
Hi there,
with DSM 7 synodsmnotify introduced new behaviour requesting i18n formated strings for which I'm happy to share the how-to.
This is a reply to previous post: DSM 7.0 - DSM7: synodsmnotify behaviour how to use i18n format and the behaviour:
$ synodsmnotify @administrators "MyPackage" "MyMessage" => title: 'MyPackage' is neither mail string key nor i18n format.

Synology updated the developer guide and online help in the mean time here: Script Messages · GitBook & Application I18N · GitBook
As per support ticket and mail exchange they are reffering to "In the past, it was not required to support multilanguage, but after DSM7, it is required by the OS to do so"

I was struggling a bit as not all details are online (texts directive is undocumented at time of writing) so in a nutshell this is required to have desktop notification working:

1) Package Id / App-name referenced in INFO & application-config (in ui directory) <e.g. dsmappname="SYNO.SDS.MyPackage">,
2) Dsmuidir referenced in INFO <e.g. dsmuidir ="ui"> & texts-dir referenced in app-config (in ui dir) <e.g. "texts": "texts">,
3) Preload referenced in application-config <e.g. "preloadTexts": [ "app:app_name", "app:inst_completed"]>,
4) Dirs per language <e.g. enu, ger> with strings file containing language strings per section <e.g. [app]> by means of section: key,
5) Using components <e.g. synodsmnotify -c SYNO.SDS.MyPackage @administrators MyPackage:app:app_name MyPackage:app:inst_completed>

PS: I created a package "DemoUiSpk7.spk" found at Home & News | Community Package Hub home-news section which is using notification, authentication et. al, feel free to inspect
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top