Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
302
Merge Requests
302
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
890865c7
Commit
890865c7
authored
Oct 05, 2012
by
Dries
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '8.x' of git.drupal.org:project/drupal into 8.x
parents
64b5b03e
258d30e2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
33 deletions
+75
-33
core/modules/locale/locale-rtl.css
core/modules/locale/locale-rtl.css
+5
-0
core/modules/locale/locale.bulk.inc
core/modules/locale/locale.bulk.inc
+11
-5
core/modules/locale/locale.datepicker.js
core/modules/locale/locale.datepicker.js
+5
-0
core/modules/locale/locale.install
core/modules/locale/locale.install
+5
-5
core/modules/locale/locale.module
core/modules/locale/locale.module
+13
-14
core/modules/locale/locale.pages.inc
core/modules/locale/locale.pages.inc
+14
-4
core/modules/locale/tests/locale_test.js
core/modules/locale/tests/locale_test.js
+4
-0
core/modules/system/system.admin.inc
core/modules/system/system.admin.inc
+18
-5
No files found.
core/modules/locale/locale-rtl.css
View file @
890865c7
/**
* @file
* CSS for the Locale module for right-to-left languages.
*/
#locale-translation-filter-form
.form-item-language
,
#locale-translation-filter-form
.form-item-translation
,
#locale-translation-filter-form
.form-item-group
{
...
...
core/modules/locale/locale.bulk.inc
View file @
890865c7
...
...
@@ -12,7 +12,10 @@
/**
* User interface for the translation import screen.
* Form constructor for the translation import screen.
*
* @see locale_translate_import_form_submit()
* @ingroup forms
*/
function
locale_translate_import_form
(
$form
,
&
$form_state
)
{
drupal_static_reset
(
'language_list'
);
...
...
@@ -101,7 +104,7 @@ function locale_translate_import_form($form, &$form_state) {
}
/**
*
Processes the locale import form submission
.
*
Form submission handler for locale_translate_import_form()
.
*/
function
locale_translate_import_form_submit
(
$form
,
&
$form_state
)
{
// Ensure we have the file uploaded.
...
...
@@ -135,7 +138,10 @@ function locale_translate_import_form_submit($form, &$form_state) {
}
/**
* Builds form to export Gettext translation files.
* Form constructor for the Gettext translation files export form.
*
* @see locale_translate_export_form_submit()
* @ingroup forms
*/
function
locale_translate_export_form
(
$form
,
&
$form_state
)
{
$languages
=
language_list
();
...
...
@@ -207,7 +213,7 @@ function locale_translate_export_form($form, &$form_state) {
}
/**
*
Processes a translation (or template) export form submission
.
*
Form submission handler for locale_translate_export_form()
.
*/
function
locale_translate_export_form_submit
(
$form
,
&
$form_state
)
{
// If template is required, language code is not given.
...
...
@@ -259,7 +265,7 @@ function locale_translate_export_form_submit($form, &$form_state) {
}
/**
* Sets a batch for a newly
added language.
* Sets a batch for a newly
-
added language.
*
* @param array $options
* An array with options that can have the following elements:
...
...
core/modules/locale/locale.datepicker.js
View file @
890865c7
/**
* @file
* Datepicker JavaScript for the Locale module.
*/
(
function
(
$
)
{
"
use strict
"
;
...
...
core/modules/locale/locale.install
View file @
890865c7
...
...
@@ -2,7 +2,7 @@
/**
* @file
* Install, update
and uninstall functions for the l
ocale module.
* Install, update
, and uninstall functions for the L
ocale module.
*/
/**
...
...
@@ -220,11 +220,11 @@ function locale_schema() {
*/
/**
* Drop textgroup support.
* Drop
s
textgroup support.
*
* Update assumes i18n migrated this data before the update happened. Core
*
never used textgroups for anything, so it is not our job to find plac
e
*
for the
data elsewhere.
* Update assumes i18n migrated this data before the update happened. Core
never
*
used textgroups for anything, so it is not our job to find a place for th
e
* data elsewhere.
*/
function
locale_update_8000
()
{
$subquery
=
db_select
(
'locales_source'
,
'ls'
)
...
...
core/modules/locale/locale.module
View file @
890865c7
...
...
@@ -2,13 +2,12 @@
/**
* @file
* Add language handling functionality and enables the translation of the
* user interface to languages other than English.
* Enables the translation of the user interface to languages other than English.
*
*
When enabled, multiple languages can be set up. The site interfac
e
*
can be displayed in different languages, as well as nodes can have languages
*
assigned. The setup of languages and translations is completely web based.
*
Gettext portable
object files are supported.
*
When enabled, multiple languages can be set up. The site interface can b
e
*
displayed in different languages, and nodes can have languages assigned. The
*
setup of languages and translations is completely web based. Gettext portable
* object files are supported.
*/
use
Drupal\locale\LocaleLookup
;
...
...
@@ -66,9 +65,6 @@
*/
const
LOCALE_CUSTOMIZED
=
1
;
// ---------------------------------------------------------------------------------
// Hook implementations
/**
* Implements hook_help().
*/
...
...
@@ -230,8 +226,6 @@ function locale_language_delete($language) {
cache
()
->
delete
(
'locale:'
.
$language
->
langcode
);
}
// ---------------------------------------------------------------------------------
// Locale core functionality
/**
...
...
@@ -570,7 +564,9 @@ function locale_form_language_admin_add_form_alter(&$form, &$form_state) {
}
/**
* Set a batch for newly added language.
* Form submission handler for language_admin_add_form().
*
* Set a batch for a newly-added language.
*/
function
locale_form_language_admin_add_form_alter_submit
(
$form
,
$form_state
)
{
if
(
empty
(
$form_state
[
'values'
][
'predefined_langcode'
])
||
$form_state
[
'values'
][
'predefined_langcode'
]
==
'custom'
)
{
...
...
@@ -599,14 +595,17 @@ function locale_form_language_admin_edit_form_alter(&$form, &$form_state) {
}
/**
*
Submission handler to record our custom setting
.
*
Form submission handler for language_admin_edit_form()
.
*/
function
locale_form_language_admin_edit_form_alter_submit
(
$form
,
$form_state
)
{
variable_set
(
'locale_translate_english'
,
$form_state
[
'values'
][
'locale_translate_english'
]);
}
/**
* Utility function to tell if locale translates to English.
* Checks whether locale translates to English.
*
* @return bool
* Returns TRUE if content should be translated to English, FALSE otherwise.
*/
function
locale_translate_english
()
{
return
variable_get
(
'locale_translate_english'
,
FALSE
);
...
...
core/modules/locale/locale.pages.inc
View file @
890865c7
...
...
@@ -8,7 +8,9 @@
use
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
;
/**
* String search screen.
* Page callback: Shows the string search screen.
*
* @see locale_menu()
*/
function
locale_translate_page
()
{
return
array
(
...
...
@@ -238,7 +240,11 @@ function locale_translate_filter_form_submit($form, &$form_state) {
}
/**
* User interface for string editing as one table.
* Form constructor for the string editing form.
*
* @see locale_menu()
* @see locale_translate_edit_form_validate()
* @see locale_translate_edit_form_submit()
*
* @ingroup forms
*/
...
...
@@ -369,7 +375,9 @@ function locale_translate_edit_form($form, &$form_state) {
}
/**
* Validate string editing form submissions.
* Form validation handler for locale_translate_edit_form().
*
* @see locale_translate_edit_form_submit()
*/
function
locale_translate_edit_form_validate
(
$form
,
&
$form_state
)
{
$langcode
=
$form_state
[
'values'
][
'langcode'
];
...
...
@@ -385,7 +393,9 @@ function locale_translate_edit_form_validate($form, &$form_state) {
}
/**
* Process string editing form submissions.
* Form submission handler for locale_translate_edit_form().
*
* @see locale_translate_edit_form_validate()
*/
function
locale_translate_edit_form_submit
(
$form
,
&
$form_state
)
{
$langcode
=
$form_state
[
'values'
][
'langcode'
];
...
...
core/modules/locale/tests/locale_test.js
View file @
890865c7
/**
* @file
* JavaScript for locale_test.module.
*/
Drupal
.
t
(
"
Standard Call t
"
);
Drupal
...
...
core/modules/system/system.admin.inc
View file @
890865c7
...
...
@@ -2835,7 +2835,9 @@ function system_add_date_formats_form_submit($form, &$form_state) {
}
/**
* Display edit date format links for each language.
* Page callback: Displays edit date format links for each language.
*
* @see locale_menu()
*/
function
system_date_format_language_overview_page
()
{
$header
=
array
(
...
...
@@ -2856,7 +2858,14 @@ function system_date_format_language_overview_page() {
}
/**
* Provide date localization configuration options to users.
* Form constructor for the date localization configuration form.
*
* @param $langcode
* The code for the current language.
*
* @see locale_menu()
* @see system_date_format_localize_form_submit()
* @ingroup forms
*/
function
system_date_format_localize_form
(
$form
,
&
$form_state
,
$langcode
)
{
// Display the current language name.
...
...
@@ -2915,7 +2924,7 @@ function system_date_format_localize_form($form, &$form_state, $langcode) {
}
/**
*
Submit handler for configuring localized date formats on the locale_date_format_form
.
*
Form submission handler for system_date_format_localize_form()
.
*/
function
system_date_format_localize_form_submit
(
$form
,
&
$form_state
)
{
$langcode
=
$form_state
[
'values'
][
'langcode'
];
...
...
@@ -2965,10 +2974,14 @@ function theme_system_date_format_localize_form($variables) {
}
/**
*
Reset locale specific date formats to the global defaults
.
*
Form constructor for the reset date format form
.
*
* @param $langcode
* Language code, e.g. 'en'.
*
* @see locale_menu()
* @see system_date_format_localize_reset_form_submit()
* @ingroup forms
*/
function
system_date_format_localize_reset_form
(
$form
,
&
$form_state
,
$langcode
)
{
$form
[
'langcode'
]
=
array
(
'#type'
=>
'value'
,
'#value'
=>
$langcode
);
...
...
@@ -2980,7 +2993,7 @@ function system_date_format_localize_reset_form($form, &$form_state, $langcode)
}
/**
*
Reset date formats for a specific language to global defaults
.
*
Form submission handler for locale_date_format_reset_form()
.
*/
function
system_date_format_localize_reset_form_submit
(
$form
,
&
$form_state
)
{
db_delete
(
'date_format_locale'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment