Projectconfiguratie
Gitlab token vereisten
Om de Gitlab API te kunnen gebruiken, moet je een project toegangstoken aanmaken. Deze token moet de volgende rechten hebben:
api: Toegang tot de APIread_api: Toegang tot het lezen van de APIread_repository: Toegang tot de repositorywrite_repository: Toegang tot het schrijven naar de repository
Met als rol Maintainer.
Regex configuratie
Bij de configuratie van het project hoort ook het instellen van de regex voor de vertalingsbestanden. Deze regex wordt gebruikt om de naam die getoond moet worden aan de gebruiker op te halen, de taalcode en het basePath.
Vereiste groepen:
(?<basePath>.*): het pad dat voor alle vertalingen in de groep gebruikt wordt.*staat voor elk teken, dus het basePath kan elk willekeurig pad zijn.
(?<namespace>[a-zA-Z-]*): de naam die getoond moet worden aan de gebruiker[a-zA-Z-]*staat voor een optionele namespace, die alleen letters en koppeltekens bevat. Dit is handig voor het categoriseren van vertalingen
Optionele groepen:
(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?): de taalcode van de taal waarin de vertalingen staan[a-zA-Z]{2,4}staat voor een taalcode van 2 tot 4 letters, zoalsen,nl,fr, etc.(-[a-zA-Z]{2,4})?staat voor een optionele landcode, zoalsen-US,nl-BE, etc.
Optionele groepen
Optionele groepen kunnen weggelaten worden, maar sommige bestanden zoals JSON vereisen deze groepen wel. Bij bestanden zoals ResX is deze niet verplicht aangezien deze een fallback bestand heeft waar geen taalcode in staat.
Template projecten
Sql injectie script
Applicatie
(?<basePath>^template\.bluenotion\.nl.*?)(?<language>/[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\/(?<namespace>[a-zA-Z-]*).json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
template.bluenotion.nl/src/i18n/nl/adminCustomerTabs.json |
template.bluenotion.nl/src/i18n/nl |
adminCustomerTabs |
nl |
|
template.bluenotion.nl/src/i18n/nl/forgot-password.json |
template.bluenotion.nl/src/i18n/nl |
forgot-password |
nl |
Server
(?<basePath>Resources\/.*?)(?<namespace>[a-zA-Z-]*).(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?).json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
Api.Bluenotion.Nl/Resources/Services/AccountService.en.json |
Api.Bluenotion.Nl/Resources/Services |
AccountService |
en |
|
Api.Bluenotion.Nl/Resources/Filters/CustomExceptionFilter.de.json |
Api.Bluenotion.Nl/Resources/Filters |
CustomExceptionFilter |
de |
Emails
(?<basePath>.*?)\/(?<namespace>[a-zA-Z]*)\.(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\.scriban$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
Api.Bluenotion.Nl/MessageTemplates/adminInvitation.nl.scriban |
Api.Bluenotion.Nl/MessageTemplates |
adminInvitation |
nl |
|
Api.Bluenotion.Nl/MessageTemplates/mailLayout.scriban |
- | - | - |
App
(?<basePath>app\.bluenotion\.nl/src/i18n.*?)(?<language>/[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\/(?<namespace>[a-zA-Z-]*).json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
app.bluenotion.nl/src/i18n/nl-NL/common.json |
app.bluenotion.nl/src/i18n/nl-NL |
common |
nl-NL |
|
app.bluenotion.nl/src/i18n/nl-NL/account/forgot-password.json |
app.bluenotion.nl/src/i18n/nl-NL/account |
forgot-password |
nl-NL |
BenFit
App
Er zijn hier 2 verschillende regex patronen, omdat sommige namespaces in subfolders staat wat voor een andere namespace zorgt.
(?<basePath>App\.BenFit\.Nl\/src)(?!\/screens).*?(?<namespace>[a-zA-Z-]*)\/(?<language>[a-zA-Z]{2,4}(?:-[a-zA-Z]{2,4})?)\.json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
App.BenFit.Nl/src/i18n/common/nl.json |
App.BenFit.Nl/src/i18n/common |
common |
nl |
|
App.BenFit.Nl/src/screens/list/Actions/translations/fr.json |
- | - | - |
(?<basePath>App\.BenFit\.Nl\/src)\/screens.*?\/(?<namespace>[a-zA-Z-]*)\/[a-zA-Z-]*\/(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\.json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
App.BenFit.Nl/src/i18n/common/nl.json |
- | - | - | |
App.BenFit.Nl/src/screens/list/Actions/translations/fr.json |
App.BenFit.Nl/src/screens/list/Actions/translations |
Actions |
fr |
Server
(?<basePath>.*?)(?<namespace>[a-zA-Z-]*)\.(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\.json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
api.benfit.nl/Api.BenFit.Nl/Resources/Services/AccountService.cs.json |
api.benfit.nl/Api.BenFit.Nl/Resources/Services |
AccountService |
cs |
|
api.benfit.nl/Api.BenFit.Nl/Resources/Filters/CustomExceptionFilter.de.json |
api.benfit.nl/Api.BenFit.Nl/Resources/Filters |
CustomExceptionFilter |
de |
|
api.benfit.nl/Api.BenFit.Nl/Resources/Attributes/BicValidationAttribute.cs.json |
api.benfit.nl/Api.BenFit.Nl/Resources/Attributes |
BicValidationAttribute |
cs |
|
api.benfit.nl/Api.BenFit.Nl/Resources/Services/AccountService-nl.json |
- | - | - |
Applicatie
Er zijn hier 2 verschillende regex patronen, omdat sommige namespaces in subfolders staat wat voor een andere namespace zorgt.
(?<basePath>web\.benfit\.nl.*?\/)(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\/(?<namespace>[a-zA-Z-]*).json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
web.benfit.nl/src/i18n/nl/common.json |
web.benfit.nl/src/i18n |
common |
nl |
|
web.benfit.nl/src/i18n/nl/account/forgot-password.json |
- | - | - |
(?<basePath>web\.benfit\.nl.*?\/i18n\/)(?<language>[a-zA-Z]{2,4}(-[a-zA-Z]{2,4})?)\/(?<namespace>[a-zA-Z-]*\/[a-zA-Z-]*).json$
| Pad | BasePath | Namespace | Taalcode | Match |
|---|---|---|---|---|
web.benfit.nl/src/i18n/nl/common.json |
- | - | - | |
web.benfit.nl/src/i18n/nl/account/forgot-password.json |
web.benfit.nl/src/i18n |
account/forgot-password |
nl |