mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1708793 - Use brandShortName in Devtools when inspecting an add-on. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D114010
This commit is contained in:
parent
a6bafba2d6
commit
0a21415853
@ -81,10 +81,14 @@ class DebugTargetInfo extends PureComponent {
|
||||
const { debugTargetData, L10N } = this.props;
|
||||
const { name, version } = debugTargetData.runtimeInfo;
|
||||
const { connectionType } = debugTargetData;
|
||||
const brandShorterName = Services.strings
|
||||
.createBundle("chrome://branding/locale/brand.properties")
|
||||
.GetStringFromName("brandShorterName");
|
||||
|
||||
return connectionType === CONNECTION_TYPES.THIS_FIREFOX
|
||||
? L10N.getFormatStr(
|
||||
"toolbox.debugTargetInfo.runtimeLabel.thisFirefox",
|
||||
"toolbox.debugTargetInfo.runtimeLabel.thisRuntime",
|
||||
brandShorterName,
|
||||
version
|
||||
)
|
||||
: L10N.getFormatStr(
|
||||
|
@ -374,7 +374,7 @@ exports[`DebugTargetInfo component Target title renders the expected snapshot fo
|
||||
<b
|
||||
className="devtools-ellipsis-text"
|
||||
>
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisFirefox-1.0.0
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisRuntime-NodeTest-1.0.0
|
||||
</b>
|
||||
<span
|
||||
className="devtools-ellipsis-text"
|
||||
@ -459,7 +459,7 @@ exports[`DebugTargetInfo component Target title renders the expected snapshot fo
|
||||
<b
|
||||
className="devtools-ellipsis-text"
|
||||
>
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisFirefox-1.0.0
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisRuntime-NodeTest-1.0.0
|
||||
</b>
|
||||
<span
|
||||
className="devtools-ellipsis-text"
|
||||
|
@ -209,12 +209,13 @@ toolbox.sourceMapSourceFailure=Error while fetching an original source: %1$S\nSo
|
||||
# The version of runtime: %2$S
|
||||
toolbox.debugTargetInfo.runtimeLabel=%1$S (%2$S)
|
||||
|
||||
# LOCALIZATION NOTE (toolbox.debugTargetInfo.runtimeLabel.thisFirefox): this is displayed
|
||||
# LOCALIZATION NOTE (toolbox.debugTargetInfo.runtimeLabel.thisRuntime): this is displayed
|
||||
# as a toolbox header in about:devtools-toolbox, when inspecting the current Firefox runtime
|
||||
# (for instance, when inspecting one of its tabs in about:debugging)
|
||||
# e.g. This Firefox (65.0a1)
|
||||
# The version of runtime: %S
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisFirefox=This Firefox (%S)
|
||||
# The name of the current runtime/application (brandShorterName): %1$S
|
||||
# The version of runtime: %2$S
|
||||
toolbox.debugTargetInfo.runtimeLabel.thisRuntime=This %1$S (%2$S)
|
||||
|
||||
# LOCALIZATION NOTE (toolbox.debugTargetInfo.tabTitleRemote):
|
||||
# Used as the tab title for about:devtools-toolbox when connected to a remote target.
|
||||
|
@ -538,6 +538,15 @@ const Services = {
|
||||
|
||||
appinfo: "",
|
||||
obs: { addObserver: () => {} },
|
||||
strings: {
|
||||
createBundle: function(bundle) {
|
||||
return {
|
||||
GetStringFromName: function(str) {
|
||||
return "NodeTest";
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
function pref(name, value) {
|
||||
|
Loading…
Reference in New Issue
Block a user