Skip to content

Commit

Permalink
ref(getting-started-docs): Fix code duplicating string part2 (#53281)
Browse files Browse the repository at this point in the history
  • Loading branch information
priscilawebdev authored Jul 21, 2023
1 parent cb9814b commit a5bf83a
Show file tree
Hide file tree
Showing 17 changed files with 94 additions and 52 deletions.
1 change: 0 additions & 1 deletion static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public Task HandleAsync(HttpContext context)
link: (
<ExternalLink href="https://github.com/getsentry/sentry-dotnet/tree/main/samples/Sentry.Samples.Google.Cloud.Functions" />
),
code: <code />,
})}
</ListItem>
<ListItem>
Expand Down
4 changes: 2 additions & 2 deletions static/app/gettingStartedDocs/elixir/elixir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ environment_name: System.get_env("RELEASE_LEVEL") || "development"
</p>
<p>
{tct(
'If using an environment with Plug or Phoenix, add the following to [codePlugRouter:Plug.Router] or [codePhoenixEndpoint:Phoenix.Endpoint]:',
{codePlugRouter: <code />, codePhoenixEndpoint: <code />}
'If using an environment with Plug or Phoenix, add the following to [plugRouterCode:Plug.Router] or [phoenixEndpointCode:Phoenix.Endpoint]:',
{plugRouterCode: <code />, phoenixEndpointCode: <code />}
)}
</p>
</Fragment>
Expand Down
8 changes: 6 additions & 2 deletions static/app/gettingStartedDocs/java/log4j2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ sentry {
description: (
<p>
{tct(
'The following example using the [log4j2Code:log4j2.xml] format to configure a [sentryAppenderCode:ConsoleAppender] that logs to standard out at the INFO level, and a [code:SentryAppender] that logs to the Sentry server at the ERROR level.',
{log4j2Code: <code />, sentryAppenderCode: <code />}
'The following example using the [log4j2Code:log4j2.xml] format to configure a [sentryConsoleAppenderCode:ConsoleAppender] that logs to standard out at the INFO level, and a [sentryAppenderCode:SentryAppender] that logs to the Sentry server at the ERROR level.',
{
log4j2Code: <code />,
sentryConsoleAppenderCode: <code />,
sentryAppenderCode: <code />,
}
)}
</p>
),
Expand Down
9 changes: 5 additions & 4 deletions static/app/gettingStartedDocs/java/spring-boot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ export const steps = ({
description: (
<p>
{tct(
'Open up [code:src/main/application.properties] (or [code:src/main/application.yml]) and configure the DSN, and any other settings you need:',
'Open up [applicationPropertiesCode:src/main/application.properties] (or [applicationYmlCode:src/main/application.yml]) and configure the DSN, and any other settings you need:',
{
code: <code />,
applicationPropertiesCode: <code />,
applicationYmlCode: <code />,
}
)}
</p>
Expand Down Expand Up @@ -116,8 +117,8 @@ sentry:
additionalInfo: (
<p>
{tct(
'If you use Logback for logging you may also want to send error logs to Sentry. Add a dependency to the [code:sentry-logback] module using either Maven or Gradle. Sentry Spring Boot Starter will auto-configure [code:SentryAppender].',
{code: <code />}
'If you use Logback for logging you may also want to send error logs to Sentry. Add a dependency to the [sentryLogbackCode:sentry-logback] module using either Maven or Gradle. Sentry Spring Boot Starter will auto-configure [sentryAppenderCode:SentryAppender].',
{sentryAppenderCode: <code />, sentryLogbackCode: <code />}
)}
</p>
),
Expand Down
8 changes: 2 additions & 6 deletions static/app/gettingStartedDocs/kotlin/kotlin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,8 @@ dependencies {
},
{
type: StepType.CONFIGURE,
description: (
<p>
{tct("Configure Sentry as soon as possible in your application's lifecycle:", {
code: <code />,
})}
</p>
description: t(
"Configure Sentry as soon as possible in your application's lifecycle:"
),
configurations: [
{
Expand Down
8 changes: 5 additions & 3 deletions static/app/gettingStartedDocs/minidump/minidump.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export const steps = ({
description: (
<p>
{tct(
'If you have already integrated a library that generates minidumps and would just like to upload them to Sentry, you need to configure the [italic:Minidump Endpoint URL], which can be found at [italic:Project Settings > Client Keys (DSN)]. This endpoint expects a [code:POST] request with the minidump in the [code:upload_file_minidump] field:',
'If you have already integrated a library that generates minidumps and would just like to upload them to Sentry, you need to configure the [minidumpEndpointUrlItalic:Minidump Endpoint URL], which can be found at [projectSettingsItalic:Project Settings > Client Keys (DSN)]. This endpoint expects a [postCode:POST] request with the minidump in the [uploadFileMinidumpCode:upload_file_minidump] field:',
{
code: <code />,
italic: <i />,
postCode: <code />,
uploadFileMinidumpCode: <code />,
minidumpEndpointUrlItalic: <i />,
projectSettingsItalic: <i />,
}
)}
</p>
Expand Down
25 changes: 17 additions & 8 deletions static/app/gettingStartedDocs/php/laravel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ public function register() {
additionalInfo: (
<p>
{tct(
'Alternatively, you can configure Sentry in your [laravelLogChannelLink:Laravel Log Channel], allowing you to log [code:info] and [code:debug] as well.',
'Alternatively, you can configure Sentry in your [laravelLogChannelLink:Laravel Log Channel], allowing you to log [codeInfo:info] and [codeDebug:debug] as well.',
{
code: <code />,
codeInfo: <code />,
codeDebug: <code />,
laravelLogChannelLink: (
<ExternalLink href="https://docs.sentry.io/platforms/php/guides/laravel/usage/#log-channels" />
),
Expand All @@ -87,8 +88,8 @@ public function register() {
description: (
<p>
{tct(
'It creates the config file ([code:config/sentry.php]) and adds the [code:DSN] to your ".env" file.',
{code: <code />}
'It creates the config file ([sentryPHPCode:config/sentry.php]) and adds the [dsnCode:DSN] to your ".env" file.',
{dsnCode: <code />, sentryPHPCode: <code />}
)}
</p>
),
Expand Down Expand Up @@ -147,8 +148,12 @@ Route::get('/debug-sentry', function () {
description: (
<p>
{tct(
'Set [code:traces_sample_rate] in [code:config/sentry.php] or [code:SENTRY_TRACES_SAMPLE_RATE] in your ".env" to a value greater than "0.0". Setting a value greater than "0.0" will enable Performance Monitoring, "0" (the default) will disable Performance Monitoring.',
{code: <code />}
'Set [tracesSampleRateCode:traces_sample_rate] in [sentryPhpCode:config/sentry.php] or [sentryTracesSampleRateCode:SENTRY_TRACES_SAMPLE_RATE] in your ".env" to a value greater than "0.0". Setting a value greater than "0.0" will enable Performance Monitoring, "0" (the default) will disable Performance Monitoring.',
{
tracesSampleRateCode: <code />,
sentryPhpCode: <code />,
sentryTracesSampleRateCode: <code />,
}
)}
</p>
),
Expand Down Expand Up @@ -204,8 +209,12 @@ SENTRY_TRACES_SAMPLE_RATE=1.0
</p>
<p>
{tct(
'You can also do this by not defining [code:SENTRY_LARAVEL_DSN] in your [code:.env] or by defining it as [code:SENTRY_LARAVEL_DSN=null].',
{code: <code />}
'You can also do this by not defining [sentryLaravelDsnCode:SENTRY_LARAVEL_DSN] in your [envCode:.env] or by defining it as [sentryLaravelDsnNullCode:SENTRY_LARAVEL_DSN=null].',
{
sentryLaravelDsnNullCode: <code />,
envCode: <code />,
sentryLaravelDsnCode: <code />,
}
)}
</p>
<p>
Expand Down
7 changes: 5 additions & 2 deletions static/app/gettingStartedDocs/php/symfony.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ export const steps = ({
description: (
<p>
{tct(
'Due to a bug in all versions below "6.0" of the [code:SensioFrameworkExtraBundle] bundle, you will likely receive an error during the execution of the command above related to the missing [code:NyholmPsr7FactoryPsr17Factory] class. To workaround the issue, if you are not using the PSR-7 bridge, please change the configuration of that bundle as follows:',
{code: <code />}
'Due to a bug in all versions below "6.0" of the [sensioFrameworkExtraBundleCode:SensioFrameworkExtraBundle] bundle, you will likely receive an error during the execution of the command above related to the missing [nyholmPsr7FactoryPsr17FactoryCode:NyholmPsr7FactoryPsr17Factory] class. To workaround the issue, if you are not using the PSR-7 bridge, please change the configuration of that bundle as follows:',
{
sensioFrameworkExtraBundleCode: <code />,
nyholmPsr7FactoryPsr17FactoryCode: <code />,
}
)}
</p>
),
Expand Down
10 changes: 7 additions & 3 deletions static/app/gettingStartedDocs/python/bottle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ export const steps = ({
type: StepType.INSTALL,
description: (
<p>
{tct('Install [code:sentry-sdk] from PyPI with the [code:bottle] extra:', {
code: <code />,
})}
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryBotteCode:bottle] extra:',
{
sentrySdkCode: <code />,
sentryBotteCode: <code />,
}
)}
</p>
),
configurations: [
Expand Down
10 changes: 7 additions & 3 deletions static/app/gettingStartedDocs/python/falcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ export const steps = ({
type: StepType.INSTALL,
description: (
<p>
{tct('Install [code:sentry-sdk] from PyPI with the [code:falcon] extra:', {
code: <code />,
})}
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryFalconCode:falcon] extra:',
{
sentrySdkCode: <code />,
sentryFalconCode: <code />,
}
)}
</p>
),
configurations: [
Expand Down
10 changes: 7 additions & 3 deletions static/app/gettingStartedDocs/python/fastapi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ export const steps = ({
type: StepType.INSTALL,
description: (
<p>
{tct('Install [code:sentry-sdk] from PyPI with the [code:fastapi] extra:', {
code: <code />,
})}
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryFastApiCode:fastapi] extra:',
{
sentrySdkCode: <code />,
sentryFastApiCode: <code />,
}
)}
</p>
),
configurations: [
Expand Down
10 changes: 7 additions & 3 deletions static/app/gettingStartedDocs/python/flask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ export const steps = ({
language: 'bash',
description: (
<p>
{tct('Install [code:sentry-sdk] from PyPI with the [code:flask] extra:', {
code: <code />,
})}
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryFlaskCode:flask] extra:',
{
sentrySdkCode: <code />,
sentryFlaskCode: <code />,
}
)}
</p>
),
code: "pip install --upgrade 'sentry-sdk[flask]'",
Expand Down
4 changes: 2 additions & 2 deletions static/app/gettingStartedDocs/python/pylons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ exclude_paths=my.package.crud
description: (
<p>
{tct(
'Add the following lines to your project’s [code:.ini] file to setup [sentryHandlerCode:SentryHandler]:',
'Add the following lines to your project’s [initCode:.ini] file to setup [sentryHandlerCode:SentryHandler]:',
{
iniCode: <code />,
initCode: <code />,
sentryHandlerCode: <code />,
}
)}
Expand Down
10 changes: 7 additions & 3 deletions static/app/gettingStartedDocs/python/starlette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ export const steps = ({
type: StepType.INSTALL,
description: (
<p>
{tct('Install [code:sentry-sdk] from PyPI with the [code:starlette] extra:', {
code: <code />,
})}
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryStarletteCode:starlette] extra:',
{
sentrySdkCode: <code />,
sentryStarletteCode: <code />,
}
)}
</p>
),
configurations: [
Expand Down
6 changes: 4 additions & 2 deletions static/app/gettingStartedDocs/react-native/react-native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ export const steps = ({
</ListItem>
<ListItem>
{tct(
"Android Specifics: We hook into Gradle for the source map build process. When you run [code:./gradlew] assembleRelease, source maps are automatically built and uploaded to Sentry. If you have enabled Gradle's [code:org.gradle.configureondemand] feature, you'll need a clean build, or you'll need to disable this feature to upload the source map on every build by setting [code:org.gradle.configureondemand=false] or remove it.",
"Android Specifics: We hook into Gradle for the source map build process. When you run [gradLewCode:./gradlew] assembleRelease, source maps are automatically built and uploaded to Sentry. If you have enabled Gradle's [orgGradleCode:org.gradle.configureondemand] feature, you'll need a clean build, or you'll need to disable this feature to upload the source map on every build by setting [orgGradleCodeConfigureCode:org.gradle.configureondemand=false] or remove it.",
{
code: <code />,
gradLewCode: <code />,
orgGradleCode: <code />,
orgGradleCodeConfigureCode: <code />,
}
)}
</ListItem>
Expand Down
5 changes: 3 additions & 2 deletions static/app/gettingStartedDocs/ruby/rack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export const steps = ({
description: (
<p>
{tct(
'Add use [code:Sentry::Rack::CaptureExceptions] to your [code:config.ru] or other rackup file (this is automatically inserted in Rails):',
'Add use [sentryRackCode:Sentry::Rack::CaptureExceptions] to your [sentryConfigCode:config.ru] or other rackup file (this is automatically inserted in Rails):',
{
code: <code />,
sentryRackCode: <code />,
sentryConfigCode: <code />,
}
)}
</p>
Expand Down
11 changes: 8 additions & 3 deletions static/app/gettingStartedDocs/ruby/rails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ export const steps = ({
type: StepType.INSTALL,
description: (
<p>
{tct('Add [code:sentry-ruby] and [code:sentry-rails] to your [code:Gemfile]:', {
code: <code />,
})}
{tct(
'Add [sentryRubyCode:sentry-ruby] and [sentryRailsCode:sentry-rails] to your [sentryGemfileCode:Gemfile]:',
{
sentryRubyCode: <code />,
sentryRailsCode: <code />,
sentryGemfileCode: <code />,
}
)}
</p>
),
configurations: [
Expand Down

0 comments on commit a5bf83a

Please sign in to comment.