I18n-friendly strings for the new system of post types
|Reported by:||demetris||Owned by:||nbachiyski|
In the new system of post types, which is also used by core for registering the default post types, UI strings for the types are constructed with fprint, and are of the form Edit %s, Add New %s, etc.
In fact, this is the only possible way at the moment, since the only language/string information a post type provides upon registration is the singular and plural form of its label, singular_label and label. But this does not work for i18n, since even simple phrases like “Edit Posts” can have many structural differences across languages: word order, parts of speech, grammatical genders, grammatical cases, etc.
An obvious solution would be to have post types specify full strings for their labels. Supposing we’ll go with this solution, here are some ideas for arguments to get us started, based on some names ryan suggested in the long ticket for custom post types (#9674).
- add_new_label (for the edit screen, it would take values like “Add new Post”, or “Add new Book Review”)
- add_new_label_short (for the menu on the left)
And some more:
- delete_label (for sending to the bin)
- delete_label_perm (for obliterating from the bin)
- restore_label (for restoring from the bin)
Change History (34)
comment:30 demetris — 4 years ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
comment:31 nacin — 4 years ago
- Keywords dev-feedback removed
- Resolution set to fixed
- Status changed from reopened to closed