Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error not loading the original image when the locale translation markdown page does not exist #11232

Open
3 tasks done
hochan222 opened this issue Jun 2, 2024 · 0 comments
Open
3 tasks done
Labels
🐛 bug Something isn't working, or isn't working as expected idle localization i18n & l10n p3 We don't have visibility when this will be addressed. wx writer experience

Comments

@hochan222
Copy link
Member

hochan222 commented Jun 2, 2024

Summary

If you load the image file used in that page without a translated page, an error will occur and the page will not be displayed. Even if there are no translation or grammar problems on the page where the error occurred.

There may be cases of using images from untranslated pages(
When it is not in the translated-content repo, but exists in the content repo) other than the current example, so it seems necessary to load the images of the page properly even if the translated page does not exist.

URL

Currently, all Korean pages have been translated, so they must be reproduced locally. I'll explain how to reproduce in Reproduction steps.

Reproduction steps

  1. yarn start
  2. Check "slug: Web/JavaScript/Reference/Global_Objects/Set" markdown file. (The page looks normal.)
  3. Add a ### Set composition section.
Section to add
### Set composition

The `Set` object provides some methods that allow you to compose sets like you would with mathematical operations. These methods include:

<table>
  <thead>
    <tr>
      <th scope="col">Method</th>
      <th scope="col">Return type</th>
      <th scope="col">Mathematical equivalent</th>
      <th scope="col">Venn diagram</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{jsxref("Set/difference", "A.difference(B)")}}</td>
      <td><code>Set</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>∖</mo><mi>B</mi></mrow><annotation encoding="TeX">A\setminus B</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="difference/diagram.svg" alt="A Venn diagram where two circles overlap. The difference of A and B is the part of A that is not overlapping B." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/intersection", "A.intersection(B)")}}</td>
      <td><code>Set</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>∩</mo><mi>B</mi></mrow><annotation encoding="TeX">A\cap B</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="intersection/diagram.svg" alt="A Venn diagram where two circles overlap. The intersection of A and B is the part where they overlap." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/symmetricDifference", "A.symmetricDifference(B)")}}</td>
      <td><code>Set</code></td>
      <td><math display="inline"><semantics><mrow><mo stretchy="false">(</mo><mi>A</mi><mo>∖</mo><mi>B</mi><mo stretchy="false">)</mo><mo>∪</mo><mo stretchy="false">(</mo><mi>B</mi><mo>∖</mo><mi>A</mi><mo stretchy="false">)</mo></mrow><annotation encoding="TeX">(A\setminus B)\cup(B\setminus A)</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="symmetricDifference/diagram.svg" alt="A Venn diagram where two circles overlap. The symmetric difference of A and B is the region contained by either circle but not both." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/union", "A.union(B)")}}</td>
      <td><code>Set</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>∪</mo><mi>B</mi></mrow><annotation encoding="TeX">A\cup B</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="union/diagram.svg" alt="A Venn diagram where two circles overlap. The symmetric difference of A and B is the region contained by either or both circles." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/isDisjointFrom", "A.isDisjointFrom(B)")}}</td>
      <td><code>Boolean</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>∩</mo><mi>B</mi><mo>=</mo><mi>∅</mi></mrow><annotation encoding="TeX">A\cap B = \empty</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="isDisjointFrom/diagram.svg" alt="A Venn diagram with two circles. A and B are disjoint because the circles have no region of overlap." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/isSubsetOf", "A.isSubsetOf(B)")}}</td>
      <td><code>Boolean</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>⊆</mo><mi>B</mi></mrow><annotation encoding="TeX">A\subseteq B</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="isSubsetOf/diagram.svg" alt="A Venn diragram with two circles. A is a subset of B because A is completely contained in B." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
    <tr>
      <td>{{jsxref("Set/isSupersetOf", "A.isSupersetOf(B)")}}</td>
      <td><code>Boolean</code></td>
      <td><math display="inline"><semantics><mrow><mi>A</mi><mo>⊇</mo><mi>B</mi></mrow><annotation encoding="TeX">A\supseteq B</annotation></semantics></math></td>
      <td style="margin:0;padding:0"><img src="isSupersetOf/diagram.svg" alt="A Venn diagram with two circles. A is a superset of B because B is completely contained in A." style="margin:0;border:0;border-radius:0" width="200" /></td>
    </tr>
  </tbody>
</table>

To make them more generalizable, these methods don't just accept `Set` objects, but anything that's [set-like](#set-like_objects).
  1. Remove "slug: Web/JavaScript/Reference/Global_Objects/Set/intersection" markdown files(or folder) for pages in Korean locale(or other locale).
  2. Check "slug: Web/JavaScript/Reference/Global_Objects/Set" markdown file. (Error)

Expected behavior

set page view

Actual behavior

Error: 500 on /ko/docs/Web/JavaScript/Reference/Global_Objects/Set/index.json: TypeError: Cannot read properties of undefined (reading 'url')
image

Device

Laptop

Browser

Chrome

Browser version

Stable

Operating system

Mac OS

Screenshot

No response

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 2, 2024
@argl argl added localization i18n & l10n involves: Content Requires the attention of the Content team. 🐛 bug Something isn't working, or isn't working as expected p3 We don't have visibility when this will be addressed. wx writer experience and removed involves: Content Requires the attention of the Content team. needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 10, 2024
@github-actions github-actions bot added the idle label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected idle localization i18n & l10n p3 We don't have visibility when this will be addressed. wx writer experience
Projects
None yet
Development

No branches or pull requests

2 participants