Opened 4 years ago
Closed 4 years ago
#5221 closed enhancement (reported-upstream)
Plugin directory: i18n of max file size for upload
Reported by: | tobifjellner | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
The function public static function get_max_allowed_file_size() just concatenates a number and a unit.
- The unit label should be available for translation.
- Some languages don't write numbers and their related unit directly after each other. So this format would need to be i18n-alized, along the lines of:
%1$s%2$s context: "max-file-size" 1. Number ; 2. Measurement unit (bytes, kb, mb, etc.)
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
No need to be complicated about it. Do what core does, and use
size_format()
. See wp-admin/includes/media.php:printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) );
This gets its translations and such using number_format_i18n.