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.

Similar threads

Nothing special to do it. The missing GUI setting does nothing more than write the additional options...
Replies
5
Views
2,836
No offense to anyone here, but you should never run a patch that was posted by a random user. This is how...
Replies
16
Views
5,445
  • Solved
It could be related to Safari's cross-origin restrictions feature. It's got me before when clicking to...
Replies
3
Views
5,755
  • Poll
I'm a new user, so I have no experience with previous versions. As a new user, DSM7 has been easy to work...
Replies
18
Views
3,521
Thanks, I never used, so uninstalled and it works, super ! Again, thanks for the support
Replies
2
Views
1,479
I solved this issue by unchecking manual DNS (was set to google 8888). Symptoms are slow initial login...
Replies
13
Views
5,359
In DSM6, I was able to see a nice graphical representation of the cache usage for my SSD cache - I'm...
Replies
0
Views
924

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