Browse Source

ref(getting-started-docs): Fix code duplicating string part2 (#53281)

Priscila Oliveira 1 year ago
parent
commit
a5bf83af0b

+ 0 - 1
static/app/gettingStartedDocs/dotnet/gcpfunctions.tsx

@@ -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>

+ 2 - 2
static/app/gettingStartedDocs/elixir/elixir.tsx

@@ -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>

+ 6 - 2
static/app/gettingStartedDocs/java/log4j2.tsx

@@ -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>
         ),

+ 5 - 4
static/app/gettingStartedDocs/java/spring-boot.tsx

@@ -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>
@@ -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>
         ),

+ 2 - 6
static/app/gettingStartedDocs/kotlin/kotlin.tsx

@@ -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: [
       {

+ 5 - 3
static/app/gettingStartedDocs/minidump/minidump.tsx

@@ -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>

+ 17 - 8
static/app/gettingStartedDocs/php/laravel.tsx

@@ -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" />
             ),
@@ -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>
         ),
@@ -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>
         ),
@@ -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>

+ 5 - 2
static/app/gettingStartedDocs/php/symfony.tsx

@@ -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>
         ),

+ 7 - 3
static/app/gettingStartedDocs/python/bottle.tsx

@@ -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: [

+ 7 - 3
static/app/gettingStartedDocs/python/falcon.tsx

@@ -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: [

Some files were not shown because too many files changed in this diff