Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101997060
PhutilAllCapsEnglishLocale.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 16, 00:16
Size
718 B
Mime Type
text/x-php
Expires
Tue, Feb 18, 00:16 (2 d)
Engine
blob
Format
Raw Data
Handle
24234630
Attached To
rPHU libphutil
PhutilAllCapsEnglishLocale.php
View Options
<?php
/**
* A test locale which transforms strings into uppercase.
*
* This can be helpful for identifying untranslated strings.
*/
final
class
PhutilAllCapsEnglishLocale
extends
PhutilLocale
{
public
function
getLocaleCode
()
{
return
'en_A*'
;
}
public
function
getLocaleName
()
{
return
pht
(
'English (US, ALL CAPS)'
);
}
public
function
getFallbackLocaleCode
()
{
return
'en_US'
;
}
public
function
isTestLocale
()
{
return
true
;
}
public
function
shouldPostProcessTranslations
()
{
return
true
;
}
public
function
didTranslateString
(
$raw_pattern
,
$translated_pattern
,
array
$args
,
$result_text
)
{
return
phutil_utf8_strtoupper
(
$result_text
);
}
}
Event Timeline
Log In to Comment