Using Addon "Component discovery" - can't get the "Regular expression to match translation files against" right #12021
-
I am unable to get the format right for the translation files, I get this: I want the component name to be the directory name (which is capitalised) or the file(s) name part which is the same as the directory, but all lower case. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
ok, after a lot more research and also asking chatGPT, I got this to work: ^root/usr/share/smanager/lib/SrvMngr/I18N/Modules/(?P<component_cap>[A-Z][a-zA-Z]*)/pofiles/(?P<component>[a-z]+)_(?P[a-z]{2}).po$ I've not come across the ?P<name> structure before. The docs could do with an example or two. |
Beta Was this translation helpful? Give feedback.
-
Interesting - I seem to have (docker) code for v5.6.2, that docs link shows 5.7. I only installed last week direct from git following your docker instructions. Have I missed a release? |
Beta Was this translation helpful? Give feedback.
ok, after a lot more research and also asking chatGPT, I got this to work:
^root/usr/share/smanager/lib/SrvMngr/I18N/Modules/(?P<component_cap>[A-Z][a-zA-Z]*)/pofiles/(?P<component>[a-z]+)_(?P[a-z]{2}).po$
I've not come across the ?P<name> structure before. The docs could do with an example or two.