l10n_update.install 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <?php
  2. /**
  3. * @file
  4. * Install file for l10n remote updates.
  5. */
  6. /**
  7. * Implements hook_schema().
  8. */
  9. function l10n_update_schema() {
  10. $schema['l10n_update_project'] = array(
  11. 'description' => 'Update information for project translations.',
  12. 'fields' => array(
  13. 'name' => array(
  14. 'description' => 'A unique short name to identify the project.',
  15. 'type' => 'varchar',
  16. 'length' => '255',
  17. 'not null' => TRUE,
  18. ),
  19. 'project_type' => array(
  20. 'description' => 'Project type, may be core, module, theme',
  21. 'type' => 'varchar',
  22. 'length' => '50',
  23. 'not null' => TRUE,
  24. ),
  25. 'core' => array(
  26. 'description' => 'Core compatibility string for this project.',
  27. 'type' => 'varchar',
  28. 'length' => '128',
  29. 'not null' => TRUE,
  30. 'default' => '',
  31. ),
  32. 'version' => array(
  33. 'description' => 'Human readable name for project used on the interface.',
  34. 'type' => 'varchar',
  35. 'length' => '128',
  36. 'not null' => TRUE,
  37. 'default' => '',
  38. ),
  39. 'l10n_path' => array(
  40. 'description' => 'Server path this project updates.',
  41. 'type' => 'varchar',
  42. 'length' => '255',
  43. 'not null' => TRUE,
  44. 'default' => '',
  45. ),
  46. 'status' => array(
  47. 'description' => 'Status flag. If TRUE, translations of this module will be updated.',
  48. 'type' => 'int',
  49. 'not null' => TRUE,
  50. 'default' => 1,
  51. ),
  52. ),
  53. 'primary key' => array('name'),
  54. );
  55. $schema['l10n_update_file'] = array(
  56. 'description' => 'File and download information for project translations.',
  57. 'fields' => array(
  58. 'project' => array(
  59. 'description' => 'A unique short name to identify the project.',
  60. 'type' => 'varchar',
  61. 'length' => '255',
  62. 'not null' => TRUE,
  63. ),
  64. 'language' => array(
  65. 'description' => 'Reference to the {languages}.language for this translation.',
  66. 'type' => 'varchar',
  67. 'length' => '12',
  68. 'not null' => TRUE,
  69. ),
  70. 'type' => array(
  71. 'description' => 'File origin: download or localfile',
  72. 'type' => 'varchar',
  73. 'length' => '50',
  74. 'not null' => TRUE,
  75. 'default' => '',
  76. ),
  77. 'filename' => array(
  78. 'description' => 'Link to translation file for download.',
  79. 'type' => 'varchar',
  80. 'length' => 255,
  81. 'not null' => TRUE,
  82. 'default' => '',
  83. ),
  84. 'fileurl' => array(
  85. 'description' => 'Link to translation file for download.',
  86. 'type' => 'varchar',
  87. 'length' => 255,
  88. 'not null' => TRUE,
  89. 'default' => '',
  90. ),
  91. 'uri' => array(
  92. 'description' => 'File system path for importing the file.',
  93. 'type' => 'varchar',
  94. 'length' => 255,
  95. 'not null' => TRUE,
  96. 'default' => '',
  97. ),
  98. 'timestamp' => array(
  99. 'description' => 'Unix timestamp of the time the file was downloaded or saved to disk. Zero if not yet downloaded',
  100. 'type' => 'int',
  101. 'not null' => FALSE,
  102. 'disp-width' => '11',
  103. 'default' => 0,
  104. ),
  105. 'version' => array(
  106. 'description' => 'Version tag of the downloaded file.',
  107. 'type' => 'varchar',
  108. 'length' => '128',
  109. 'not null' => TRUE,
  110. 'default' => '',
  111. ),
  112. 'status' => array(
  113. 'description' => 'Status flag. TBD',
  114. 'type' => 'int',
  115. 'not null' => TRUE,
  116. 'default' => 1,
  117. ),
  118. 'last_checked' => array(
  119. 'description' => 'Unix timestamp of the last time this translation was downloaded from or checked at remote server and confirmed to be the most recent release available.',
  120. 'type' => 'int',
  121. 'not null' => FALSE,
  122. 'disp-width' => '11',
  123. 'default' => 0,
  124. ),
  125. ),
  126. 'primary key' => array('project', 'language'),
  127. );
  128. return $schema;
  129. }
  130. /**
  131. * Implements hook_schema_alter().
  132. */
  133. function l10n_update_schema_alter(&$schema) {
  134. $schema['locales_target']['fields']['l10n_status'] = array(
  135. 'type' => 'int',
  136. 'not null' => TRUE,
  137. 'default' => 0,
  138. 'description' => 'Boolean indicating whether the translation is custom to this site.',
  139. );
  140. }
  141. /**
  142. * Implements hook_install().
  143. */
  144. function l10n_update_install() {
  145. db_add_field('locales_target', 'l10n_status', array(
  146. 'type' => 'int',
  147. 'not null' => TRUE,
  148. 'default' => 0,
  149. ));
  150. variable_set('l10n_update_rebuild_projects', 1);
  151. // Create the translation directory. We try different alternative paths as the
  152. // default may not always be writable.
  153. $directories = array(
  154. variable_get('l10n_update_download_store', L10N_UPDATE_DEFAULT_TRANSLATION_PATH),
  155. variable_get('file_public_path', conf_path() . '/files') . '/translations',
  156. 'sites/default/files/translations',
  157. );
  158. foreach ($directories as $directory) {
  159. if (file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
  160. variable_set('l10n_update_download_store', $directory);
  161. l10n_update_ensure_htaccess($directory);
  162. return;
  163. }
  164. }
  165. watchdog('l10n_update', 'The directory %directory does not exist or is not writable.', array('%directory' => $directories[0]), WATCHDOG_ERROR);
  166. drupal_set_message(t('The directory %directory does not exist or is not writable.', array('%directory' => $directories[0])), 'error');
  167. }
  168. /**
  169. * Implements hook_uninstall().
  170. */
  171. function l10n_update_uninstall() {
  172. db_drop_field('locales_target', 'l10n_status');
  173. variable_del('l10n_update_check_disabled');
  174. variable_del('l10n_update_default_filename');
  175. variable_del('l10n_update_default_update_url');
  176. variable_del('l10n_update_import_enabled');
  177. variable_del('l10n_update_import_mode');
  178. variable_del('l10n_update_check_frequency');
  179. variable_del('l10n_update_last_check');
  180. variable_del('l10n_update_download_store');
  181. variable_del('l10n_update_check_mode');
  182. }
  183. /**
  184. * Implements hook_requirements().
  185. */
  186. function l10n_update_requirements($phase) {
  187. $requirements = array();
  188. if ($phase == 'runtime') {
  189. $available_updates = array();
  190. $untranslated = array();
  191. $languages = l10n_update_translatable_language_list();
  192. if ($languages) {
  193. // Determine the status of the translation updates per language.
  194. $status = l10n_update_get_status();
  195. if ($status) {
  196. foreach ($status as $project) {
  197. foreach ($project as $langcode => $project_info) {
  198. if (empty($project_info->type)) {
  199. $untranslated[$langcode] = $languages[$langcode];
  200. }
  201. elseif ($project_info->type == L10N_UPDATE_LOCAL || $project_info->type == L10N_UPDATE_REMOTE) {
  202. $available_updates[$langcode] = $languages[$langcode];
  203. }
  204. }
  205. }
  206. if ($available_updates || $untranslated) {
  207. if ($available_updates) {
  208. $requirements['l10n_update'] = array(
  209. 'title' => 'Translation update status',
  210. 'value' => l(t('Updates available'), 'admin/config/regional/translate/update'),
  211. 'severity' => REQUIREMENT_WARNING,
  212. 'description' => t('Updates available for: @languages. See the <a href="!updates">Translate interface update</a> page for more information.', array(
  213. '@languages' => implode(', ', $available_updates),
  214. '!updates' => url('admin/config/regional/translate/update'),
  215. )),
  216. );
  217. }
  218. else {
  219. $requirements['l10n_update'] = array(
  220. 'title' => 'Translation update status',
  221. 'value' => t('Missing translations'),
  222. 'severity' => REQUIREMENT_INFO,
  223. 'description' => t('Missing translations for: @languages. See the <a href="!updates">Translate interface update</a> page for more information.', array(
  224. '@languages' => implode(', ', $untranslated),
  225. '!updates' => url('admin/config/regional/translate/update'),
  226. )),
  227. );
  228. }
  229. }
  230. else {
  231. $requirements['l10n_update'] = array(
  232. 'title' => 'Translation update status',
  233. 'value' => t('Up to date'),
  234. 'severity' => REQUIREMENT_OK,
  235. );
  236. }
  237. }
  238. else {
  239. $requirements['locale_translation'] = array(
  240. 'title' => 'Translation update status',
  241. 'value' => l(t('Can not determine status'), 'admin/config/regional/translate/update'),
  242. 'severity' => REQUIREMENT_WARNING,
  243. 'description' => t('No translation status is available. See the <a href="!updates">Translate interface update</a> page for more information.', array('!updates' => url('admin/config/regional/translate/update'))),
  244. );
  245. }
  246. }
  247. // Test the contents of the .htaccess file in the translations directory.
  248. l10n_update_ensure_htaccess();
  249. $htaccess_file = 'translations://.htaccess';
  250. $directory = variable_get('l10n_update_download_store', L10N_UPDATE_DEFAULT_TRANSLATION_PATH);
  251. // Check for the string which was added to the recommended .htaccess file
  252. // in the latest security update.
  253. if (!file_exists($htaccess_file) || !($contents = @file_get_contents($htaccess_file)) || strpos($contents, 'Drupal_Security_Do_Not_Remove_See_SA_2013_003') === FALSE) {
  254. $requirements['l10n_update_htaccess'] = array(
  255. 'title' => t('Translations directory'),
  256. 'value' => t('Not fully protected'),
  257. 'severity' => REQUIREMENT_ERROR,
  258. 'description' => t('See <a href="@url">@url</a> for information about the recommended .htaccess file which should be added to the %directory directory to help protect against arbitrary code execution.', array('@url' => 'http://drupal.org/SA-CORE-2013-003', '%directory' => $directory)),
  259. );
  260. }
  261. }
  262. if ($phase == 'update') {
  263. // Make sure the 'translations' stream wrapper class gets registered.
  264. // This is needed when upgrading to 7.x-2.x.
  265. if (!class_exists('TranslationsStreamWrapper')) {
  266. registry_rebuild();
  267. }
  268. }
  269. return $requirements;
  270. }
  271. /**
  272. * Converts D8 style translations strings into D7 format.
  273. *
  274. * Drupal 8 stores plurals (both for source and translation strings) as one
  275. * string, where the plural forms are separated by a special character. By
  276. * mistake this plural handling was also back ported. This function converts any
  277. * D8 style plural into a D7 style plural. It used the following strategy.
  278. * - Any locales_source record that contains the separator character is
  279. * converted.
  280. * - All these records are deleted, except those of which the translation was
  281. * edited.
  282. * - Existing translations will only be overwritten by converted translations
  283. * if the import behaviour setting (admin/config/regional/language/update)
  284. * allows that.
  285. *
  286. * @param int $start
  287. * The number of start.
  288. * @param int $length
  289. * The length number.
  290. * @param array $report
  291. * Array containing import results.
  292. *
  293. * @return bool
  294. * Returns true conversion
  295. * a keyed array of log messages. Available keys:
  296. * - message: Translated message
  297. * - status: Message status. See drush_log() for supported values.
  298. */
  299. function l10n_update_d8_plural_conversion($start = 0, $length = 0, array &$report) {
  300. module_load_include('inc', 'l10n_update', 'l10n_update.translation');
  301. require_once DRUPAL_ROOT . '/includes/locale.inc';
  302. $processed = array();
  303. $plurals = l10n_update_get_d8_plural_strings($start, $length);
  304. $finished = count($plurals) < $length;
  305. if (empty($plurals)) {
  306. return $finished;
  307. }
  308. $mode = variable_get('l10n_update_import_mode', LOCALE_IMPORT_OVERWRITE);
  309. $writer = new PoDatabaseWriter();
  310. $writer->setOptions(array(
  311. 'overwrite_options' => array(
  312. 'not_customized' => $mode != LOCALE_IMPORT_KEEP,
  313. 'customized' => $mode == LOCALE_IMPORT_OVERWRITE,
  314. ),
  315. 'customized' => L10N_UPDATE_NOT_CUSTOMIZED,
  316. ));
  317. $writer_report = isset($report['writer']) ? $report['writer'] : array();
  318. $writer->setReport($writer_report);
  319. foreach ($plurals as $plural) {
  320. // Extract data from source and target strings.
  321. $sources = explode(L10N_UPDATE_PLURAL_DELIMITER, $plural->source);
  322. $translations = explode(L10N_UPDATE_PLURAL_DELIMITER, $plural->translation);
  323. $writer->setLangcode($plural->language);
  324. $item = new PoItem();
  325. $item->setContext($plural->context);
  326. $item->setSource($sources);
  327. $item->setTranslation($translations);
  328. $item->setPlural(TRUE);
  329. $item->setLangcode($plural->language);
  330. $item->setTextgroup($plural->textgroup);
  331. $writer->writeItem($item);
  332. // Collect plurals to be deleted. In the rare case that a translation was
  333. // modified, we will convert it but not delete the custom translation.
  334. if (!$plural->l10n_status) {
  335. $report['results']['lids'][] = $plural->lid;
  336. }
  337. $report['results']['languages'][$plural->language] = $plural->language;
  338. }
  339. $report['writer'] = $writer->getReport();
  340. unset($report['writer']['strings']);
  341. return $finished;
  342. }
  343. /**
  344. * Gets D8 plural style strings.
  345. *
  346. * @param int $start
  347. * Offset of records to load.
  348. * @param int $length
  349. * Maximum number of records to load.
  350. *
  351. * @return array|bool
  352. * An array of data from source and translation strings of which the source
  353. * string contains a Drupal 8 style plural delimiter. Returns false if not
  354. * found.
  355. */
  356. function l10n_update_get_d8_plural_strings($start = 0, $length = 0) {
  357. $translation_strings = FALSE;
  358. $query = db_select('locales_source', 'ls');
  359. $query->fields('ls', array(
  360. 'lid', 'location',
  361. 'textgroup',
  362. 'source',
  363. 'context',
  364. 'version',
  365. ));
  366. $query->fields('lt', array(
  367. 'translation',
  368. 'language',
  369. 'plid',
  370. 'plural',
  371. 'l10n_status',
  372. ));
  373. $query->innerJoin('locales_target', 'lt', 'ls.lid = lt.lid');
  374. $query->condition('source', '%' . db_like(L10N_UPDATE_PLURAL_DELIMITER) . '%', 'LIKE');
  375. if ($length) {
  376. $query->range($start, $length);
  377. }
  378. $results = $query->execute();
  379. if ($results->rowCount()) {
  380. foreach ($results as $result) {
  381. $translation_strings[] = $result;
  382. }
  383. }
  384. return $translation_strings;
  385. }
  386. /**
  387. * Clean-up after plural string conversion.
  388. *
  389. * @param array $results
  390. * Batch results array.
  391. */
  392. function l10n_update_finish_d8_plural_strings($results) {
  393. require_once DRUPAL_ROOT . '/includes/locale.inc';
  394. if ($results) {
  395. // Delete converted D8 style translations.
  396. if (isset($results['lids'])) {
  397. foreach ($results['lids'] as $lids) {
  398. db_delete('locales_source')->condition('lid', $lids)->execute();
  399. db_delete('locales_target')->condition('lid', $lids)->execute();
  400. }
  401. }
  402. // Clear caches if translations are modified.
  403. if (isset($results['languages'])) {
  404. cache_clear_all('locale:', 'cache', TRUE);
  405. foreach ($results['languages'] as $langcode) {
  406. _locale_invalidate_js($langcode);
  407. }
  408. }
  409. }
  410. }
  411. /**
  412. * Rename filepath to uri in {l10n_update_file} table.
  413. */
  414. function l10n_update_update_7001() {
  415. // Only do this update if the field exists from D6.
  416. // If it doesn't, we've got a pure D7 site that doesn't need it.
  417. if (db_field_exists('l10n_update_file', 'filepath')) {
  418. db_change_field('l10n_update_file', 'filepath', 'uri', array(
  419. 'description' => 'File system path for importing the file.',
  420. 'type' => 'varchar',
  421. 'length' => 255,
  422. 'not null' => TRUE,
  423. 'default' => '',
  424. ));
  425. }
  426. }
  427. /**
  428. * Delete 'last_updated' field from {l10n_update_file} table.
  429. */
  430. function l10n_update_update_7002() {
  431. db_drop_field('l10n_update_file', 'last_updated');
  432. }
  433. /**
  434. * Delete 'import_date' field from {l10n_update_file} table.
  435. */
  436. function l10n_update_update_7003() {
  437. db_drop_field('l10n_update_file', 'import_date');
  438. }
  439. /**
  440. * Create {cache_l10n_update} table.
  441. */
  442. function l10n_update_update_7004() {
  443. // Code removed. Table {cache_l10n_update} is no longer used.
  444. }
  445. /**
  446. * Migration to 7.x-2.x branch.
  447. */
  448. function l10n_update_update_7200() {
  449. // Make sure the 'translations' stream wrapper class gets registered.
  450. if (!class_exists('TranslationsStreamWrapper')) {
  451. registry_rebuild();
  452. }
  453. // If no translation directory was set, set one here. We try different
  454. // alternative paths as the default may not always be writable.
  455. if (!variable_get('l10n_update_download_store', '')) {
  456. $directories = array(
  457. variable_get('l10n_update_download_store', L10N_UPDATE_DEFAULT_TRANSLATION_PATH),
  458. variable_get('file_public_path', conf_path() . '/files') . '/translations',
  459. 'sites/default/files/translations',
  460. );
  461. $directory_created = FALSE;
  462. foreach ($directories as $directory) {
  463. if (file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
  464. variable_set('l10n_update_download_store', $directory);
  465. $directory_created = TRUE;
  466. break;
  467. }
  468. }
  469. if (!$directory_created) {
  470. watchdog('l10n_update', 'The directory %directory does not exist or is not writable.', array('%directory' => $directories[0]), WATCHDOG_ERROR);
  471. drupal_set_message(t('The directory %directory does not exist or is not writable.', array('%directory' => $directories[0])), 'error');
  472. }
  473. }
  474. // Translation source 'Remote server only' is no longer supported. Use 'Remote
  475. // and local' instead.
  476. $mode = variable_get('l10n_update_check_mode', 3);
  477. if ($mode == 1) {
  478. variable_set('l10n_update_check_mode', 3);
  479. }
  480. // Daily cron updates are no longer supported. Use weekly instead.
  481. $frequency = variable_get('l10n_update_check_frequency', '0');
  482. if ($frequency == '1') {
  483. variable_set('l10n_update_check_frequency', '7');
  484. }
  485. // Clean up deprecated variables.
  486. variable_del('l10n_update_default_server');
  487. variable_del('l10n_update_default_server_url');
  488. variable_del('l10n_update_rebuild_projects');
  489. }
  490. /**
  491. * Sets the default translation files directory.
  492. */
  493. function l10n_update_update_7201() {
  494. if (!variable_get('l10n_update_download_store', '')) {
  495. variable_set('l10n_update_download_store', 'sites/all/translations');
  496. }
  497. }
  498. /**
  499. * Removes table {cache_l10n_update}.
  500. */
  501. function l10n_update_update_7202() {
  502. if (db_table_exists('cache_l10n_update')) {
  503. db_drop_table('cache_l10n_update');
  504. }
  505. }
  506. /**
  507. * Removes the field 'l10n_server' from table {cache_l10n_update}.
  508. */
  509. function l10n_update_update_7203() {
  510. if (db_field_exists('l10n_update_project', 'l10n_server')) {
  511. db_drop_field('l10n_update_project', 'l10n_server');
  512. }
  513. }
  514. /**
  515. * Increase the length of the name column.
  516. */
  517. function l10n_update_update_7204() {
  518. $schema = l10n_update_schema();
  519. db_change_field('l10n_update_project', 'name', 'name', $schema['l10n_update_project']['fields']['name']);
  520. }
  521. /**
  522. * Increase the length of the name column.
  523. */
  524. function l10n_update_update_7205() {
  525. $schema = l10n_update_schema();
  526. db_change_field('l10n_update_file', 'project', 'project', $schema['l10n_update_file']['fields']['project']);
  527. }
  528. /**
  529. * Remove 'headers' field from cache table.
  530. */
  531. function l10n_update_update_7206() {
  532. if (db_field_exists('cache_l10n_update', 'headers')) {
  533. db_drop_field('cache_l10n_update', 'headers');
  534. }
  535. }
  536. /**
  537. * Migrate D8 style plurals to D7 style.
  538. */
  539. function l10n_update_update_7207(&$sandbox) {
  540. $message = NULL;
  541. $batch_size = 50;
  542. if (!isset($sandbox['progress'])) {
  543. $sandbox['progress'] = 0;
  544. $sandbox['max'] = count(l10n_update_get_d8_plural_strings());
  545. $sandbox['report'] = array();
  546. }
  547. if ($sandbox['max'] == 0) {
  548. $sandbox['#finished'] = 1;
  549. return NULL;
  550. }
  551. $finished = l10n_update_d8_plural_conversion($sandbox['progress'], $batch_size, $sandbox['report']);
  552. $sandbox['progress'] += $batch_size;
  553. // Whether the batch is finished is determined by the result of
  554. // l10n_update_d8_plural_conversion().The progress (percentage) is
  555. // calculated.
  556. if (empty($sandbox['max']) || $finished) {
  557. $sandbox['#finished'] = 1;
  558. }
  559. else {
  560. $sandbox['#finished'] = $sandbox['progress'] / $sandbox['max'];
  561. }
  562. if ($sandbox['#finished'] == 1) {
  563. l10n_update_finish_d8_plural_strings($sandbox['report']['results']);
  564. if ($sandbox['report']['writer']['skips']) {
  565. $message = t('Some problems were reported during plural string migration. See <a href="/admin/reports/dblog">Recent log messages</a> for details.');
  566. }
  567. }
  568. return $message;
  569. }
  570. /**
  571. * Remove the status variable.
  572. */
  573. function l10n_update_update_7208() {
  574. $status = variable_get('l10n_update_translation_status');
  575. cache_set('l10n_update_status', $status);
  576. variable_del('l10n_update_translation_status');
  577. }
  578. /**
  579. * Update default variable values to use https.
  580. */
  581. function l10n_update_update_7209() {
  582. $server_url = variable_get('l10n_client_server', '');
  583. if ($server_url == 'http://localize.drupal.org') {
  584. variable_set('l10n_client_server', 'https://localize.drupal.org');
  585. }
  586. $update_url = variable_get('l10n_update_default_update_url', '');
  587. if ($update_url == 'http://ftp.drupal.org/files/translations/%core/%project/%project-%release.%language.po') {
  588. variable_set('l10n_update_default_update_url', L10N_UPDATE_DEFAULT_SERVER_PATTERN);
  589. }
  590. }
  591. /**
  592. * Add a .htaccess file to the translations directory.
  593. */
  594. function l10n_update_update_7210() {
  595. l10n_update_ensure_htaccess();
  596. }