diff --git a/lang/af.yml b/lang/af.yml index b1846a08f56..440dd8ee046 100644 --- a/lang/af.yml +++ b/lang/af.yml @@ -64,6 +64,8 @@ af: Save: Stoor SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Verander + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Soek SilverStripe\Forms\GridField\GridFieldPaginator: OF: van Page: Bladsy diff --git a/lang/ar.yml b/lang/ar.yml index ab0ccd09ed8..80b4d45d975 100644 --- a/lang/ar.yml +++ b/lang/ar.yml @@ -79,6 +79,8 @@ ar: Saved: 'المحفوظ {اسم} {رابط}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: تحرير + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: بحث SilverStripe\Forms\GridField\GridFieldPaginator: OF: من Page: صفحة diff --git a/lang/az.yml b/lang/az.yml index a1fd2411639..084c4096e05 100644 --- a/lang/az.yml +++ b/lang/az.yml @@ -31,6 +31,8 @@ az: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: 'Dərc olunmuş saytdan sil' Save: 'Yadda saxla' + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Axtar SilverStripe\Forms\GridField\GridFieldPaginator: Page: Səhifə SilverStripe\Forms\MoneyField: diff --git a/lang/bg.yml b/lang/bg.yml index 59af3fa84a9..a611bcd4730 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -94,6 +94,8 @@ bg: Save: Запис SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Редактиране + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Търси SilverStripe\Forms\GridField\GridFieldPaginator: OF: от Page: Страница diff --git a/lang/bs.yml b/lang/bs.yml index c42d9e706db..852ed6cd47a 100644 --- a/lang/bs.yml +++ b/lang/bs.yml @@ -33,6 +33,8 @@ bs: SilverStripe\Forms\GridField\GridFieldDetailForm: Create: Kreiraj Save: Snimi + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Pretraga SilverStripe\Forms\GridField\GridFieldPaginator: Page: Stranica SilverStripe\ORM\FieldType\DBBoolean: diff --git a/lang/ca.yml b/lang/ca.yml index 9df22df1ef1..2a7ef383cae 100644 --- a/lang/ca.yml +++ b/lang/ca.yml @@ -30,6 +30,8 @@ ca: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: Suprimeix Save: Desa + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Cerca SilverStripe\Forms\GridField\GridFieldPaginator: Page: Pàgina SilverStripe\ORM\DataObject: diff --git a/lang/cs.yml b/lang/cs.yml index 21054b331ea..64a3a1f4a5b 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -86,6 +86,8 @@ cs: Saved: 'Uloženo {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Editovat + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Hledat SilverStripe\Forms\GridField\GridFieldPaginator: OF: z Page: Stránka diff --git a/lang/da.yml b/lang/da.yml index eeb43a98e65..64285582656 100644 --- a/lang/da.yml +++ b/lang/da.yml @@ -88,6 +88,8 @@ da: Save: Gem SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Rediger + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Søg SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Kan ikke fjerne dig selv fra denne gruppe, du vil miste administrator rettigheder' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/de.yml b/lang/de.yml index e85811b4727..b1fc852f888 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -133,6 +133,7 @@ de: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Suche "{name}"' SearchFormFaliure: 'Das Suchformular konnte nicht erzeugt werden' + Search_Default: Suche SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Sie können sich nicht selber von dieser Gruppe entfernen, Sie würden Admin-Rechte verlieren.' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/de_DE.yml b/lang/de_DE.yml index a6aad96f88f..7ef68b96e9b 100644 --- a/lang/de_DE.yml +++ b/lang/de_DE.yml @@ -49,6 +49,7 @@ de_DE: EDIT: Bearbeiten SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Suche "{name}"' + Search_Default: Suche SilverStripe\Forms\GridField\GridFieldPaginator: Page: Seite View: Anzeigen diff --git a/lang/en.yml b/lang/en.yml index adb6d3eb383..35c20794dbd 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -132,6 +132,7 @@ en: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Search "{name}"' SearchFormFaliure: 'No search form could be generated' + Search_Default: Search SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Cannot remove yourself from this group, you will lose admin rights' SilverStripe\Forms\GridField\GridFieldPaginator: @@ -199,6 +200,25 @@ en: YEARS_SHORT_PLURALS: one: '{count} year' other: '{count} years' + SilverStripe\ORM\FieldType\DBDatetime: + nDays: + one: 'one day' + other: '{count} days' + nHours: + one: 'one hour' + other: '{count} hours' + nMinutes: + one: 'one minute' + other: '{count} minutes' + nMonths: + one: 'one month' + other: '{count} months' + nSeconds: + one: 'one second' + other: '{count} seconds' + nYears: + one: 'one year' + other: '{count} years' SilverStripe\ORM\FieldType\DBEnum: ANY: Any SilverStripe\ORM\FieldType\DBForeignKey: diff --git a/lang/eo.yml b/lang/eo.yml index 1d1a79e519f..77076fbb02a 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -134,6 +134,7 @@ eo: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Serĉi por {name}' SearchFormFaliure: 'Ne eblis generi serĉan formularon' + Search_Default: Serĉi SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Ne povas forigi vin el ĉi tiu grupo; vi perdus administrajn rajtojn' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/es.yml b/lang/es.yml index 194ddb4e930..acf2fe90482 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -87,6 +87,8 @@ es: Saved: 'Guardado {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Editar + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Buscar SilverStripe\Forms\GridField\GridFieldPaginator: OF: de Page: Página diff --git a/lang/es_AR.yml b/lang/es_AR.yml index d4c51f13a9a..58057432e2a 100644 --- a/lang/es_AR.yml +++ b/lang/es_AR.yml @@ -32,6 +32,8 @@ es_AR: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: Eliminar Save: Guardar + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Buscar SilverStripe\Forms\GridField\GridFieldPaginator: Page: Página SilverStripe\Forms\MoneyField: diff --git a/lang/es_MX.yml b/lang/es_MX.yml index 967aeb4f351..cd528bb4845 100644 --- a/lang/es_MX.yml +++ b/lang/es_MX.yml @@ -62,6 +62,8 @@ es_MX: Save: Guardar SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Editar + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Buscar SilverStripe\Forms\GridField\GridFieldPaginator: Page: Página View: Ver diff --git a/lang/et_EE.yml b/lang/et_EE.yml index d6d99c1fa20..6ee9a3ccf46 100644 --- a/lang/et_EE.yml +++ b/lang/et_EE.yml @@ -72,6 +72,8 @@ et_EE: Saved: 'Salvestatud {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Redigeeri + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Otsi SilverStripe\Forms\GridField\GridFieldPaginator: OF: / Page: Leht diff --git a/lang/fa_IR.yml b/lang/fa_IR.yml index 81af6b10082..0c4d175ef18 100644 --- a/lang/fa_IR.yml +++ b/lang/fa_IR.yml @@ -85,6 +85,8 @@ fa_IR: Saved: 'ذخیره‌شده {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: ویرایش + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: جستجو SilverStripe\Forms\GridField\GridFieldPaginator: OF: از Page: صفحه diff --git a/lang/fi.yml b/lang/fi.yml index 94c2e781302..a0748844bbe 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -100,6 +100,7 @@ fi: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Hae "{name}"' SearchFormFaliure: 'Hakulomaketta ei voitu luoda' + Search_Default: Haku SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Et voi siirtää itseäsi pois tästä ryhmästä: menettäisit pääkäyttäjän oikeudet' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/fi_FI.yml b/lang/fi_FI.yml index 0a9462341ab..2f309989180 100644 --- a/lang/fi_FI.yml +++ b/lang/fi_FI.yml @@ -115,6 +115,7 @@ fi_FI: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Hae "{name}"' SearchFormFaliure: 'Hakulomaketta ei voitu luoda' + Search_Default: Haku SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Et voi siirtää itseäsi pois tästä ryhmästä: menettäisit pääkäyttäjän oikeudet' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/fo.yml b/lang/fo.yml index 3713ccc6ae6..e9635a57b33 100644 --- a/lang/fo.yml +++ b/lang/fo.yml @@ -27,6 +27,8 @@ fo: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: Strika Save: Goym + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Leita SilverStripe\Forms\GridField\GridFieldPaginator: Page: Síða SilverStripe\ORM\DataObject: diff --git a/lang/fr.yml b/lang/fr.yml index 374827ee8c9..5cc7cb61d9c 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -101,6 +101,8 @@ fr: SAVETOASTMESSAGE: 'Sauvegardé {type} "{title}" avec succès.' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Éditer + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Rechercher SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: "Impossible de retirer votre propre profil de ce groupe, vous perdriez vos droits d'administration" SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/he_IL.yml b/lang/he_IL.yml index efc4124c8e7..41186a822a5 100644 --- a/lang/he_IL.yml +++ b/lang/he_IL.yml @@ -25,6 +25,8 @@ he_IL: Create: יצירה Delete: מחק Save: שמור + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: חיפוש SilverStripe\Forms\GridField\GridFieldPaginator: OF: מתוך Page: עמוד diff --git a/lang/hr.yml b/lang/hr.yml index 5b1e225b6f0..fb5265f4297 100644 --- a/lang/hr.yml +++ b/lang/hr.yml @@ -58,6 +58,8 @@ hr: Saved: 'Spremljeno {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Uredi + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Traži SilverStripe\Forms\GridField\GridFieldPaginator: OF: od Page: Stranica diff --git a/lang/hu.yml b/lang/hu.yml index 2ea9b4947c6..f19de65b79d 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -27,6 +27,8 @@ hu: Save: Mentés SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Szerkeszt + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Keresés SilverStripe\Forms\GridField\GridFieldPaginator: Page: Oldal SilverStripe\Forms\UrlField: diff --git a/lang/id.yml b/lang/id.yml index e3a6649c809..2f82e212261 100644 --- a/lang/id.yml +++ b/lang/id.yml @@ -76,6 +76,8 @@ id: Deleted: '{type} {name} dihapus' Save: Simpan Saved: 'Simpan {name} {link}' + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Cari SilverStripe\Forms\GridField\GridFieldPaginator: OF: dari Page: Laman diff --git a/lang/id_ID.yml b/lang/id_ID.yml index 07aac5daa98..a3bd503d3fd 100644 --- a/lang/id_ID.yml +++ b/lang/id_ID.yml @@ -74,6 +74,8 @@ id_ID: Deleted: '{type} {name} dihapus' Save: Simpan Saved: 'Simpan {name} {link}' + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Cari SilverStripe\Forms\GridField\GridFieldPaginator: OF: dari Page: Laman diff --git a/lang/is.yml b/lang/is.yml index 60521695667..7696fc336bc 100644 --- a/lang/is.yml +++ b/lang/is.yml @@ -36,6 +36,8 @@ is: Save: Vista SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Breyta + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Leita SilverStripe\Forms\GridField\GridFieldPaginator: Page: Síða SilverStripe\Forms\MoneyField: diff --git a/lang/it.yml b/lang/it.yml index 81558df266c..a58d0441c46 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -117,6 +117,7 @@ it: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Cerca "{name}"' SearchFormFaliure: 'Nessun modulo di ricerca può essere generato' + Search_Default: Cerca SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Non è possibile rimuovere te stesso da questo gruppo, perderesti i diritti di admin' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/ja.yml b/lang/ja.yml index 5ea88709b4c..cb816684983 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -74,6 +74,8 @@ ja: Saved: '保存 {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: 編集 + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: 検索 SilverStripe\Forms\GridField\GridFieldPaginator: OF: の Page: ページ diff --git a/lang/ja_JP.yml b/lang/ja_JP.yml index f15586c769f..d2d7709fe95 100644 --- a/lang/ja_JP.yml +++ b/lang/ja_JP.yml @@ -53,6 +53,8 @@ ja_JP: Delete: 削除 DeletePermissionsFailure: 削除権限がありません Save: 保存 + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: 検索 SilverStripe\Forms\GridField\GridFieldPaginator: Page: ページ SilverStripe\Forms\MoneyField: diff --git a/lang/lt.yml b/lang/lt.yml index e498ceb36c1..1ae6d2d2a6b 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -81,6 +81,8 @@ lt: Saved: 'Išsaugota {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Redaguoti + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Ieškoti SilverStripe\Forms\GridField\GridFieldPaginator: OF: iš Page: Puslapis diff --git a/lang/lv.yml b/lang/lv.yml index 7e6dc122532..f52dfdce735 100644 --- a/lang/lv.yml +++ b/lang/lv.yml @@ -32,6 +32,8 @@ lv: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: 'Dzēst no publicētās vietnes' Save: Saglabāt + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Meklēt SilverStripe\Forms\GridField\GridFieldPaginator: Page: Lapa SilverStripe\Forms\MoneyField: diff --git a/lang/mi.yml b/lang/mi.yml index 32481c6a24a..380254d0cf0 100644 --- a/lang/mi.yml +++ b/lang/mi.yml @@ -76,6 +76,8 @@ mi: Saved: 'I tiakina te {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Whakatika + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Rapu SilverStripe\Forms\GridField\GridFieldPaginator: OF: o Page: Whārangi diff --git a/lang/nb.yml b/lang/nb.yml index 63403d24340..9a7916fd003 100644 --- a/lang/nb.yml +++ b/lang/nb.yml @@ -74,6 +74,8 @@ nb: Saved: 'Lagret {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Rediger + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Søk SilverStripe\Forms\GridField\GridFieldPaginator: OF: av Page: Side diff --git a/lang/nl.yml b/lang/nl.yml index 2fb4b5005e6..87608a01298 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -115,6 +115,7 @@ nl: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Zoek naar "{name}"' SearchFormFaliure: 'Er kon geen zoekformulier worden aangemaakt' + Search_Default: Zoek SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Je kan jezelf niet verwijderen van deze groep, omdat je dan geen admin-rechten meer hebt.' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/pl.yml b/lang/pl.yml index e446ff93740..34f938a22de 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -118,6 +118,7 @@ pl: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Wyszukaj "{name}"' SearchFormFaliure: 'Nie można wygenerować formularza wyszukiwania' + Search_Default: Szukaj SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Nie możesz usunąć siebie z tej grupy, stracone zostałby prawa administratora' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/pl_PL.yml b/lang/pl_PL.yml index 471438ebb40..5e02d6a65d5 100644 --- a/lang/pl_PL.yml +++ b/lang/pl_PL.yml @@ -23,6 +23,8 @@ pl_PL: Save: Zapisz SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Edytuj + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Szukaj SilverStripe\Forms\GridField\GridFieldPaginator: Page: Strona SilverStripe\Forms\UrlField: diff --git a/lang/pt.yml b/lang/pt.yml index 9669989a37e..1a0560d1231 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -47,6 +47,8 @@ pt: Delete: Apagar DeletePermissionsFailure: 'Não tem permissões para apagar' Save: Guardar + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Procurar SilverStripe\Forms\GridField\GridFieldPaginator: OF: de Page: Página diff --git a/lang/pt_BR.yml b/lang/pt_BR.yml index 2f9301caca9..0a0a2519efb 100644 --- a/lang/pt_BR.yml +++ b/lang/pt_BR.yml @@ -34,6 +34,8 @@ pt_BR: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: Excluir Save: Salvar + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Buscar SilverStripe\Forms\GridField\GridFieldPaginator: Page: Página SilverStripe\ORM\DataObject: diff --git a/lang/ro.yml b/lang/ro.yml index e19007e0d4c..89b3805dba5 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -37,6 +37,8 @@ ro: Save: Salvează SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Editare + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Căutare SilverStripe\Forms\GridField\GridFieldPaginator: Page: Pagină SilverStripe\Forms\UrlField: diff --git a/lang/ru.yml b/lang/ru.yml index 3f7a3d34b38..9ece36575cf 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -94,6 +94,8 @@ ru: Saved: 'Сохранено: {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Редактировать + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Поиск SilverStripe\Forms\GridField\GridFieldPaginator: OF: из Page: Страница diff --git a/lang/sk.yml b/lang/sk.yml index 1d0c2c5ab03..77da3f93e44 100644 --- a/lang/sk.yml +++ b/lang/sk.yml @@ -129,6 +129,7 @@ sk: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Hľadať "{name}"' SearchFormFaliure: 'Nepodarilo sa vygenerovať žiadny vyhľadávací formulár' + Search_Default: Hľadať SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Z tejto skupiny sa nemôžete odstrániť, stratíte práva správcu' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/sl.yml b/lang/sl.yml index f5384456c50..c80e7ebb8d6 100644 --- a/lang/sl.yml +++ b/lang/sl.yml @@ -118,6 +118,7 @@ sl: SilverStripe\Forms\GridField\GridFieldFilterHeader: Search: 'Išči "{name}"' SearchFormFaliure: 'Ni nam uspelo pripraviti obrazca za iskanje' + Search_Default: Najdi SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Ne moremo vas odstraniti iz te skupine, saj boste izgubili administratorske pravice' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/sr.yml b/lang/sr.yml index 51f70736dfe..1d4c022ff7e 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -74,6 +74,8 @@ sr: Saved: 'Сачувано {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Измени + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Претражи SilverStripe\Forms\GridField\GridFieldPaginator: OF: од Page: Страница diff --git a/lang/sr@latin.yml b/lang/sr@latin.yml index 6f0c2fbfc9f..5050c682e75 100644 --- a/lang/sr@latin.yml +++ b/lang/sr@latin.yml @@ -73,6 +73,8 @@ sr@latin: Saved: 'Sačuvano {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Izmeni + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Pretraga SilverStripe\Forms\GridField\GridFieldPaginator: OF: od Page: Stranica diff --git a/lang/sr_RS.yml b/lang/sr_RS.yml index bf64837f09f..682faae072a 100644 --- a/lang/sr_RS.yml +++ b/lang/sr_RS.yml @@ -74,6 +74,8 @@ sr_RS: Saved: 'Сачувано {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Измени + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Претрага SilverStripe\Forms\GridField\GridFieldPaginator: OF: од Page: Страница diff --git a/lang/sr_RS@latin.yml b/lang/sr_RS@latin.yml index d1f572ef952..fb6141c9142 100644 --- a/lang/sr_RS@latin.yml +++ b/lang/sr_RS@latin.yml @@ -73,6 +73,8 @@ sr_RS@latin: Saved: 'Sačuvano {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Izmeni + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Pretraži SilverStripe\Forms\GridField\GridFieldPaginator: OF: od Page: Stranica diff --git a/lang/sv.yml b/lang/sv.yml index bc131363aa9..d10feea358a 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -95,6 +95,8 @@ sv: Saved: 'Sparade {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: Ändra + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Sök SilverStripe\Forms\GridField\GridFieldGroupDeleteAction: UnlinkSelfFailure: 'Du kan inte radera dig själv från den här gruppen, då du då kommer att förlora dina admin-rättigheter' SilverStripe\Forms\GridField\GridFieldPaginator: diff --git a/lang/th.yml b/lang/th.yml index 25f265fa345..034e24ddb52 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -61,6 +61,8 @@ th: Save: บันทึก SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: แก้ไข + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: ค้นหา SilverStripe\Forms\GridField\GridFieldPaginator: OF: จาก Page: หน้า diff --git a/lang/tr.yml b/lang/tr.yml index 36ebbaec318..f477481b21f 100644 --- a/lang/tr.yml +++ b/lang/tr.yml @@ -41,6 +41,8 @@ tr: Create: Oluştur Delete: Sil Save: Kaydet + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Ara SilverStripe\Forms\GridField\GridFieldPaginator: Page: Sayfa SilverStripe\Forms\NullableField: diff --git a/lang/uk.yml b/lang/uk.yml index a92caeeb697..2daa2751c00 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -38,6 +38,8 @@ uk: Delete: Видалити Save: Зберегти Saved: 'Збережено {name} {link}' + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: Пошук SilverStripe\Forms\GridField\GridFieldPaginator: Page: Сторінка SilverStripe\Forms\MoneyField: diff --git a/lang/zh.yml b/lang/zh.yml index 7fbd6b5d4b8..4de477f1f34 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -80,6 +80,8 @@ zh: Saved: '已保存 {name} {link}' SilverStripe\Forms\GridField\GridFieldEditButton: EDIT: 编辑 + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: 查询 SilverStripe\Forms\GridField\GridFieldPaginator: OF: 的 Page: 页面 diff --git a/lang/zh_CN.yml b/lang/zh_CN.yml index a6669497320..ced69cef768 100644 --- a/lang/zh_CN.yml +++ b/lang/zh_CN.yml @@ -20,6 +20,8 @@ zh_CN: SilverStripe\Forms\GridField\GridFieldDetailForm: Delete: 删除 Save: 保存 + SilverStripe\Forms\GridField\GridFieldFilterHeader: + Search_Default: 搜索 SilverStripe\Forms\GridField\GridFieldPaginator: Page: 页面 SilverStripe\ORM\DataObject: diff --git a/src/Forms/DateField.php b/src/Forms/DateField.php index 5649f8039e1..4bbc9ed4d5d 100644 --- a/src/Forms/DateField.php +++ b/src/Forms/DateField.php @@ -101,6 +101,7 @@ class DateField extends TextField * to detect invalid values. * * @var mixed + * @deprecated 5.4.0 Use $value instead */ protected $rawValue = null; diff --git a/src/Forms/DatetimeField.php b/src/Forms/DatetimeField.php index c822dbf7b42..b8e4a7b0985 100644 --- a/src/Forms/DatetimeField.php +++ b/src/Forms/DatetimeField.php @@ -75,6 +75,7 @@ class DatetimeField extends TextField * to detect invalid values. * * @var mixed + * @deprecated 5.4.0 Use $value instead */ protected $rawValue = null; diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index b6f336b8972..d5a08e39a95 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -16,6 +16,7 @@ use SilverStripe\View\SSViewer; use SilverStripe\Model\ModelData; use SilverStripe\ORM\DataObject; +use SilverStripe\Dev\Deprecation; /** * Represents a field in a form. @@ -1226,9 +1227,11 @@ public function Type() * @param bool $result * @param Validator $validator * @return bool + * @deprecated 5.4.0 Use extend() directly instead */ protected function extendValidationResult(bool $result, Validator $validator): bool { + Deprecation::notice('5.4.0', 'Use extend() directly instead'); $this->extend('updateValidationResult', $result, $validator); return $result; } diff --git a/src/Forms/TimeField.php b/src/Forms/TimeField.php index 24ba4645f3d..ffe43821fcc 100644 --- a/src/Forms/TimeField.php +++ b/src/Forms/TimeField.php @@ -48,6 +48,7 @@ class TimeField extends TextField * to detect invalid values. * * @var mixed + * @deprecated 5.4.0 Use $value instead */ protected $rawValue = null; diff --git a/src/ORM/DataObject.php b/src/ORM/DataObject.php index bea3921807b..8a004ffec4e 100644 --- a/src/ORM/DataObject.php +++ b/src/ORM/DataObject.php @@ -128,6 +128,15 @@ class DataObject extends ModelData implements DataObjectInterface, i18nEntityPro */ private static $plural_name = null; + /** + * Description of the class. + * Unlike most configuration, this is usually used uninherited, meaning it should be defined + * on each subclass. + * + * Used in some areas of the CMS, e.g. when selecting what type of record to create. + */ + private static ?string $class_description = null; + /** * @config */ @@ -946,6 +955,44 @@ public function i18n_plural_name() return _t(static::class . '.PLURALNAME', $this->plural_name()); } + /** + * Get description for this class + * @return null|string + */ + public function classDescription() + { + return static::config()->get('class_description', Config::UNINHERITED); + } + + /** + * Get localised description for this class + * @return null|string + */ + public function i18n_classDescription() + { + $notDefined = 'NOT_DEFINED'; + $baseDescription = $this->classDescription() ?? $notDefined; + + // Check the new i18n key first + $description = _t(static::class . '.CLASS_DESCRIPTION', $baseDescription); + if ($description !== $baseDescription) { + return $description; + } + + // Fall back on the deprecated localisation key + $legacyI18n = _t(static::class . '.DESCRIPTION', $baseDescription); + if ($legacyI18n !== $baseDescription) { + return $legacyI18n; + } + + // If there was no description available in config nor in i18n, return null + if ($baseDescription === $notDefined) { + return null; + } + // Return raw description + return $baseDescription; + } + /** * Standard implementation of a title/label for a specific * record. Tries to find properties 'Title' or 'Name', @@ -3567,7 +3614,7 @@ public static function flush_and_destroy_cache() */ public static function reset() { - DBEnum::flushCache(); + DBEnum::reset(); ClassInfo::reset_db_cache(); static::getSchema()->reset(); DataObject::$_cache_get_one = []; @@ -4393,7 +4440,8 @@ public function provideI18nEntities() $singularName = $this->singular_name(); $conjunction = preg_match('/^[aeiou]/i', $singularName ?? '') ? 'An ' : 'A '; return [ - static::class . '.SINGULARNAME' => $this->singular_name(), + static::class . '.CLASS_DESCRIPTION' => $this->classDescription(), + static::class . '.SINGULARNAME' => $singularName, static::class . '.PLURALNAME' => $pluralName, static::class . '.PLURALS' => [ 'one' => $conjunction . $singularName, diff --git a/src/ORM/FieldType/DBDatetime.php b/src/ORM/FieldType/DBDatetime.php index 1b3ba7009f2..0ba5a201b03 100644 --- a/src/ORM/FieldType/DBDatetime.php +++ b/src/ORM/FieldType/DBDatetime.php @@ -244,19 +244,16 @@ public static function getTimeBetween(DBDateTime $from, DBDateTime $to): string ['count' => $diff->i] ); } + $message = _t( + __CLASS__ . '.nSeconds', + 'one second|{count} seconds', + ['count' => $diff->s ?? 0] + ); if ($diff->s) { - $result[] = _t( - __CLASS__ . '.nSeconds', - 'one second|{count} seconds', - ['count' => $diff->s] - ); + $result[] = $message; } if (empty($result)) { - return _t( - __CLASS__ . '.nSeconds', - '{count} seconds', - ['count' => 0] - ); + return $message; } return implode(', ', $result); } diff --git a/src/ORM/FieldType/DBEnum.php b/src/ORM/FieldType/DBEnum.php index 56409d8fb33..d9874a40d68 100644 --- a/src/ORM/FieldType/DBEnum.php +++ b/src/ORM/FieldType/DBEnum.php @@ -4,6 +4,8 @@ use SilverStripe\Core\Config\Config; use SilverStripe\Core\Validation\FieldValidation\OptionFieldValidator; +use SilverStripe\Core\Resettable; +use SilverStripe\Dev\Deprecation; use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\FormField; use SilverStripe\Forms\SelectField; @@ -17,7 +19,7 @@ * * See {@link DropdownField} for a {@link FormField} to select enum values. */ -class DBEnum extends DBString +class DBEnum extends DBString implements Resettable { private static array $field_validators = [ OptionFieldValidator::class => ['getEnum'], @@ -43,8 +45,15 @@ class DBEnum extends DBString /** * Clear all cached enum values. + * @deprecated 5.4.0 Use reset() instead. */ public static function flushCache(): void + { + Deprecation::notice('5.4.0', 'Use reset() instead.'); + static::reset(); + } + + public static function reset(): void { DBEnum::$enum_cache = []; } @@ -182,7 +191,7 @@ public function getEnum(): array * If table or name are not set, or if it is not a valid field on the given table, * then only known enum values are returned. * - * Values cached in this method can be cleared via `DBEnum::flushCache();` + * Values cached in this method can be cleared via `DBEnum::reset();` */ public function getEnumObsolete(): array { diff --git a/src/i18n/TextCollection/i18nTextCollector.php b/src/i18n/TextCollection/i18nTextCollector.php index 53b095888cb..28a7448a3fa 100644 --- a/src/i18n/TextCollection/i18nTextCollector.php +++ b/src/i18n/TextCollection/i18nTextCollector.php @@ -601,6 +601,7 @@ public function collectFromCode($content, $fileName, Module $module) $entities = []; $tokens = token_get_all("Colour = 'Red'; $obj->write(); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( ['Red', 'Blue', 'Green'], @@ -104,7 +104,7 @@ public function testObsoleteValues() // If the value is removed from the enum, obsolete content is still retained $colourField->setEnum(['Blue', 'Green', 'Purple']); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( ['Blue', 'Green', 'Purple', 'Red'], // Red on the end now, because it's obsolete @@ -135,7 +135,7 @@ public function testObsoleteValues() // If obsolete records are deleted, the extra values go away $obj->delete(); $obj2->delete(); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( ['Blue', 'Green'], $colourField->getEnumObsolete() diff --git a/tests/php/ORM/DataObjectSchemaGenerationTest.php b/tests/php/ORM/DataObjectSchemaGenerationTest.php index e5c04ce185e..05909e6259b 100644 --- a/tests/php/ORM/DataObjectSchemaGenerationTest.php +++ b/tests/php/ORM/DataObjectSchemaGenerationTest.php @@ -197,7 +197,7 @@ public function testClassNameSpecGeneration() $schema = DataObject::getSchema(); // Test with blank entries - DBEnum::flushCache(); + DBEnum::reset(); $do1 = new TestObject(); $fields = $schema->databaseFields(TestObject::class, false); // May be overridden from DBClassName to DBClassNameVarchar by config @@ -215,7 +215,7 @@ public function testClassNameSpecGeneration() // Test with instance of subclass $item1 = new TestIndexObject(); $item1->write(); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( [ TestObject::class, @@ -228,7 +228,7 @@ public function testClassNameSpecGeneration() // Test with instance of main class $item2 = new TestObject(); $item2->write(); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( [ TestObject::class, @@ -243,7 +243,7 @@ public function testClassNameSpecGeneration() $item1->write(); $item2 = new TestObject(); $item2->write(); - DBEnum::flushCache(); + DBEnum::reset(); $this->assertEquals( [ TestObject::class, diff --git a/tests/php/ORM/DataObjectTest.php b/tests/php/ORM/DataObjectTest.php index 9bd1735b001..f71787a16e7 100644 --- a/tests/php/ORM/DataObjectTest.php +++ b/tests/php/ORM/DataObjectTest.php @@ -1913,52 +1913,124 @@ public function testManyManyUnlimitedRowCount() $this->assertEquals(2, $player->Teams()->dataQuery()->query()->unlimitedRowCount()); } + public function provideSingularName(): array + { + return [ + [ + 'class' => DataObjectTest\Player::class, + 'expected' => 'Player', + ], + [ + 'class' => DataObjectTest\Team::class, + 'expected' => 'Team', + ], + [ + 'class' => DataObjectTest\Fixture::class, + 'expected' => 'Fixture', + ], + ]; + } + /** * Tests that singular_name() generates sensible defaults. + * @dataProvider provideSingularName */ - public function testSingularName() + public function testSingularName(string $class, string $expected): void { - $assertions = [ - DataObjectTest\Player::class => 'Player', - DataObjectTest\Team::class => 'Team', - DataObjectTest\Fixture::class => 'Fixture', - ]; + i18n::set_locale('en_NZ'); + /** @var DataObject $object */ + $object = new $class(); + $this->assertEquals( + $expected, + $object->singular_name(), + "Assert that the singular_name for '$class' is correct." + ); + $this->assertEquals( + $expected, + $object->i18n_singular_name(), + "Assert that the i18n_singular_name for '$class' is correct." + ); + } - foreach ($assertions as $class => $expectedSingularName) { - $this->assertEquals( - $expectedSingularName, - singleton($class)->singular_name(), - "Assert that the singular_name for '$class' is correct." - ); - } + public function providePluralName(): array + { + return [ + [ + 'class' => DataObjectTest\Player::class, + 'expected' => 'Players', + ], + [ + 'class' => DataObjectTest\Team::class, + 'expected' => 'Teams', + ], + [ + 'class' => DataObjectTest\Fixture::class, + 'expected' => 'Fixtures', + ], + [ + 'class' => DataObjectTest\Play::class, + 'expected' => 'Plays', + ], + [ + 'class' => DataObjectTest\Bogey::class, + 'expected' => 'Bogeys', + ], + [ + 'class' => DataObjectTest\Ploy::class, + 'expected' => 'Ploys', + ], + ]; } /** * Tests that plural_name() generates sensible defaults. + * @dataProvider providePluralName */ - public function testPluralName() - { - $assertions = [ - DataObjectTest\Player::class => 'Players', - DataObjectTest\Team::class => 'Teams', - DataObjectTest\Fixture::class => 'Fixtures', - DataObjectTest\Play::class => 'Plays', - DataObjectTest\Bogey::class => 'Bogeys', - DataObjectTest\Ploy::class => 'Ploys', + public function testPluralName(string $class, string $expected): void + { + i18n::set_locale('en_NZ'); + /** @var DataObject $object */ + $object = new $class(); + $this->assertEquals( + $expected, + $object->plural_name(), + "Assert that the plural_name for '$class' is correct." + ); + $this->assertEquals( + $expected, + $object->i18n_plural_name(), + "Assert that the i18n_plural_name for '$class' is correct." + ); + } + + public function provideClassDescription(): array + { + return [ + 'no description by default' => [ + 'class' => DataObjectTest\Player::class, + 'expected' => null, + ], + 'explicitly set description' => [ + 'class' => DataObjectTest\Team::class, + 'expected' => 'A team of players', + ], + 'cannot inherit description from superclass' => [ + 'class' => DataObjectTest\SubTeam::class, + 'expected' => null, + ], ]; + } + + /** + * @dataProvider provideClassDescription + */ + public function testClassDescription(string $class, ?string $expected): void + { i18n::set_locale('en_NZ'); - foreach ($assertions as $class => $expectedPluralName) { - $this->assertEquals( - $expectedPluralName, - DataObject::singleton($class)->plural_name(), - "Assert that the plural_name for '$class' is correct." - ); - $this->assertEquals( - $expectedPluralName, - DataObject::singleton($class)->i18n_plural_name(), - "Assert that the i18n_plural_name for '$class' is correct." - ); - } + /** @var DataObject $object */ + $object = new $class(); + $this->assertEquals($expected, $object->classDescription()); + $this->assertEquals($expected, $object->i18n_classDescription()); } public function testHasDatabaseField() diff --git a/tests/php/ORM/DataObjectTest/Team.php b/tests/php/ORM/DataObjectTest/Team.php index 07c0b310ec6..42de8d3ad56 100644 --- a/tests/php/ORM/DataObjectTest/Team.php +++ b/tests/php/ORM/DataObjectTest/Team.php @@ -28,6 +28,8 @@ class Team extends DataObject implements TestOnly { private static $table_name = 'DataObjectTest_Team'; + private static $class_description = 'A team of players'; + private static $db = [ 'Title' => 'Varchar', 'DatabaseField' => 'HTMLVarchar', diff --git a/tests/php/Security/SecurityTest.php b/tests/php/Security/SecurityTest.php index 9f73a925df3..cec3ccf9555 100644 --- a/tests/php/Security/SecurityTest.php +++ b/tests/php/Security/SecurityTest.php @@ -681,7 +681,7 @@ public function testSuccessfulLoginAttempts() public function testDatabaseIsReadyWithInsufficientMemberColumns() { Security::clear_database_is_ready(); - DBEnum::flushCache(); + DBEnum::reset(); // Assumption: The database has been built correctly by the test runner, // and has all columns present in the ORM diff --git a/tests/php/i18n/i18nTest/MyObject.php b/tests/php/i18n/i18nTest/MyObject.php index 63b2e76254d..9405faad7a2 100644 --- a/tests/php/i18n/i18nTest/MyObject.php +++ b/tests/php/i18n/i18nTest/MyObject.php @@ -24,6 +24,8 @@ class MyObject extends DataObject implements TestOnly private static $plural_name = "My Objects"; + private static $class_description = 'A class that represents objects'; + public function provideI18nEntities() { $entities = parent::provideI18nEntities(); diff --git a/tests/php/i18n/i18nTextCollectorTest.php b/tests/php/i18n/i18nTextCollectorTest.php index 6fe81c6e44e..5c96f1e6637 100644 --- a/tests/php/i18n/i18nTextCollectorTest.php +++ b/tests/php/i18n/i18nTextCollectorTest.php @@ -715,11 +715,64 @@ public function testCollectFromEntityProvidersInCustomObject() 'other' => '{count} My Objects', ], 'SilverStripe\i18n\Tests\i18nTest\MyObject.SINGULARNAME' => 'My Object', + 'SilverStripe\i18n\Tests\i18nTest\MyObject.CLASS_DESCRIPTION' => 'A class that represents objects', ], $matches ); } + public function testCollectFromAnonymousMethod() + { + $c = i18nTextCollector::create(); + $mymodule = ModuleLoader::inst()->getManifest()->getModule('i18ntestmodule'); + $php = <<someMethod(_t( + MyClass::class . '.SOMETHING_A', + 'something a', + )); + }); + } + + public function getNewLinesWithSomething(\$class, \$something) { + Deprecation::withSuppressedNotice(function () use (\$something) { + \$this->someMethod(_t( + MyClass::class . '.SOMETHING_B', + 'something {something}', + ['something' => \$something] + )); + }); + } + + public function getNewLinesWithSomething(\$class, \$something) { + Deprecation::withSuppressedNotice(function ( + \$myparam + ) use (\$something) { + \$this->someMethod(_t( + MyClass::class . '.SOMETHING_C', + 'something {something} {myparam}', + ['something' => \$something, 'myparam' => \$myparam] + )); + }); + } +} +PHP; + $this->assertEquals( + [ + 'SilverStripe\\Framework\\Core\\MyClass.SOMETHING_A' => "something a", + 'SilverStripe\\Framework\\Core\\MyClass.SOMETHING_B' => "something {something}", + 'SilverStripe\\Framework\\Core\\MyClass.SOMETHING_C' => "something {something} {myparam}", + ], + $c->collectFromCode($php, null, $mymodule) + ); + } + public function testCollectFromEntityProvidersInWebRoot() { // Collect from i18nProviderClass