Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106122279
PhabricatorTranslationsConfigOptions.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
Sat, Mar 22, 17:26
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Mar 24, 17:26 (2 d)
Engine
blob
Format
Raw Data
Handle
25052471
Attached To
rPH Phabricator
PhabricatorTranslationsConfigOptions.php
View Options
<?php
final
class
PhabricatorTranslationsConfigOptions
extends
PhabricatorApplicationConfigOptions
{
public
function
getName
()
{
return
pht
(
'Translations'
);
}
public
function
getDescription
()
{
return
pht
(
'Options relating to translations.'
);
}
public
function
getFontIcon
()
{
return
'fa-globe'
;
}
public
function
getOptions
()
{
return
array
(
$this
->
newOption
(
'translation.provider'
,
'class'
,
'PhabricatorEnglishTranslation'
)
->
setBaseClass
(
'PhabricatorTranslation'
)
->
setSummary
(
pht
(
'Translation class that should be used for strings.'
))
->
setDescription
(
pht
(
'This allows customizing texts used in Phabricator. The class '
.
'must extend PhabricatorTranslation.'
))
->
addExample
(
'PhabricatorEnglishTranslation'
,
pht
(
'Valid Setting'
)),
// TODO: This should be dict<string,string> I think, but that doesn't
// exist yet.
$this
->
newOption
(
'translation.override'
,
'wild'
,
array
())
->
setSummary
(
pht
(
'Override translations.'
))
->
setDescription
(
pht
(
"You can use 'translation.override' if you don't want to create "
.
"a full translation to give users an option for switching to it "
.
"and you just want to override some strings in the default "
.
"translation."
))
->
addExample
(
'{"some string": "my alternative"}'
,
pht
(
'Valid Setting'
)),
);
}
}
Event Timeline
Log In to Comment