Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
6559b06e
Commit
6559b06e
authored
Oct 30, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made intl messages more compatible with various ICU versions
issue #1072
parent
66fd16e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
MessageFormatter.php
framework/yii/i18n/MessageFormatter.php
+1
-1
BaseListView.php
framework/yii/widgets/BaseListView.php
+5
-2
No files found.
framework/yii/i18n/MessageFormatter.php
View file @
6559b06e
...
@@ -92,7 +92,7 @@ class MessageFormatter extends Component
...
@@ -92,7 +92,7 @@ class MessageFormatter extends Component
return
$this
->
fallbackFormat
(
$pattern
,
$params
,
$language
);
return
$this
->
fallbackFormat
(
$pattern
,
$params
,
$language
);
}
}
if
(
version_compare
(
PHP_VERSION
,
'5.5.0'
,
'<'
))
{
if
(
version_compare
(
PHP_VERSION
,
'5.5.0'
,
'<'
)
||
version_compare
(
INTL_ICU_VERSION
,
'4.8'
,
'<'
)
)
{
$pattern
=
$this
->
replaceNamedArguments
(
$pattern
,
$params
);
$pattern
=
$this
->
replaceNamedArguments
(
$pattern
,
$params
);
$params
=
array_values
(
$params
);
$params
=
array_values
(
$params
);
}
}
...
...
framework/yii/widgets/BaseListView.php
View file @
6559b06e
...
@@ -135,18 +135,21 @@ abstract class BaseListView extends Widget
...
@@ -135,18 +135,21 @@ abstract class BaseListView extends Widget
$totalCount
=
$this
->
dataProvider
->
getTotalCount
();
$totalCount
=
$this
->
dataProvider
->
getTotalCount
();
$begin
=
$pagination
->
getPage
()
*
$pagination
->
pageSize
+
1
;
$begin
=
$pagination
->
getPage
()
*
$pagination
->
pageSize
+
1
;
$end
=
$begin
+
$count
-
1
;
$end
=
$begin
+
$count
-
1
;
if
(
$begin
>
$end
)
{
$begin
=
$end
;
}
$page
=
$pagination
->
getPage
()
+
1
;
$page
=
$pagination
->
getPage
()
+
1
;
$pageCount
=
$pagination
->
pageCount
;
$pageCount
=
$pagination
->
pageCount
;
if
((
$summaryContent
=
$this
->
summary
)
===
null
)
{
if
((
$summaryContent
=
$this
->
summary
)
===
null
)
{
$summaryContent
=
'<div class="summary">'
$summaryContent
=
'<div class="summary">'
.
Yii
::
t
(
'yii'
,
'Showing <b>{
totalCount, plural, zero{0} other{{begin, number, integer}-{end, number, integer}}}</b> of <b>{totalCount, number, integ
er}</b> {totalCount, plural, one{item} other{items}}.'
)
.
Yii
::
t
(
'yii'
,
'Showing <b>{
begin, number}-{end, number}</b> of <b>{totalCount, numb
er}</b> {totalCount, plural, one{item} other{items}}.'
)
.
'</div>'
;
.
'</div>'
;
}
}
}
else
{
}
else
{
$begin
=
$page
=
$pageCount
=
1
;
$begin
=
$page
=
$pageCount
=
1
;
$end
=
$totalCount
=
$count
;
$end
=
$totalCount
=
$count
;
if
((
$summaryContent
=
$this
->
summary
)
===
null
)
{
if
((
$summaryContent
=
$this
->
summary
)
===
null
)
{
$summaryContent
=
'<div class="summary">'
.
Yii
::
t
(
'yii'
,
'Total <b>{count, number
, integer
}</b> {count, plural, one{item} other{items}}.'
)
.
'</div>'
;
$summaryContent
=
'<div class="summary">'
.
Yii
::
t
(
'yii'
,
'Total <b>{count, number}</b> {count, plural, one{item} other{items}}.'
)
.
'</div>'
;
}
}
}
}
return
Yii
::
$app
->
getI18n
()
->
format
(
$summaryContent
,
[
return
Yii
::
$app
->
getI18n
()
->
format
(
$summaryContent
,
[
...
...
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