If all displayed strings are extracted out of the code and replaced by variables the translation into other languages would be easier. Attached are a modified default (English) autosave.js where all strings are replaced by variables and a localized German version.

Comments

ferrum’s picture

StatusFileSize
new4.46 KB
new4.34 KB
ferrum’s picture

Title: make translations of autosave.js easier » next step: use Drupal's localization mechanism
StatusFileSize
new4.31 KB

next step: use Drupal's localization mechanism

Now when the language dependent strings are extracted use Drupal's translation function Drupal.t() to add these strings to the normal localization mechanism.

ferrum’s picture

ferrum’s picture

Title: next step: use Drupal's localization mechanism » make translations of autosave.js easier
StatusFileSize
new3.7 KB

now here is a German translation for all of the language dependent strings used in autosave

ferrum’s picture

StatusFileSize
new5.19 KB

for autosave 6.x-2.10 use

ferrum’s picture

Title: make translations of autosave.js easier » use Drupal's translation mechanism for Javascript files
liquidcms’s picture

can you provide this as a patch file on the latest 6.x-2.x-dev?

quicksketch’s picture

Status: Active » Closed (duplicate)

The patch over at #1502026: Allow interface translation provides the same thing and looks ready to go to me. The .po files are no longer part of individual projects (they live over at localize.drupal.org now), so there's no reason to keep this issue open.