WordPress.org

Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#2070 closed defect (bug) (invalid)

internationalization of javascript files

Reported by: nbachiyski Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.0
Component: General Keywords:
Focuses: Cc:

Description

Since javascript files are plain text their internatinalization is harder. Is it possible that all .js files are converted to .php ones?

Here is a sample patch for wp-admin/list-manipulation.js.

Attachments (1)

i18n-list-manip.diff (2.5 KB) - added by nbachiyski 16 years ago.

Download all attachments as: .zip

Change History (3)

#1 @andy
15 years ago

Translated strings cannot be concatenated into a sentence because you cannot assume word order.

'<?php echo addslashes(__('Are you sure you want to delete this')); ?>' + ' ' + what + '?'

should be

'<?php echo addslashes(sprintf(__('Are you sure you want to delete this %s?'), $what)); ?>'

#2 @rob1n
15 years ago

  • Resolution set to invalid
  • Status changed from new to closed

already fixed.

Note: See TracTickets for help on using tickets.