Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

fix bug 792418: Build sensible default topic structure for translations#620

Merged
groovecoder merged 2 commits intomdn:masterfrom
lmorchard:792418-l10n-topic-parent
Oct 1, 2012
Merged

fix bug 792418: Build sensible default topic structure for translations#620
groovecoder merged 2 commits intomdn:masterfrom
lmorchard:792418-l10n-topic-parent

Conversation

@lmorchard
Copy link
Copy Markdown
Contributor

  • If a translation doesn't have a topic parent, attempt to assign one
    for it:
    • If the document on which the translation is based has a topic
      parent, look for the translation of that topic parent in the current
      locale and use it.
    • If the document on which the translation is based has a topic parent,
      but that topic parent has not yet been translated, auto-clone a
      stub translation in the current locale and use it.
  • All the above wrapped in a utility method in anticipation of bug 792417
  • Tests

* If a translation doesn't have a topic parent, attempt to assign one
  for it:

    * If the document on which the translation is based has a topic
      parent, look for the translation of that topic parent in the current
      locale and use it.

    * If the document on which the translation is based has a topic parent,
      but that topic parent has not yet been translated, auto-clone a
      stub translation in the current locale and use it.

* All the above wrapped in a utility method in anticipation of
  bug 792417

* Tests
@lmorchard
Copy link
Copy Markdown
Contributor Author

Spot check topic parent assignment:

  • Create en-US documents like the following:
    • /en-US/docs/CSS
    • /en-US/docs/CSS/Using_CSS_Transitions
  • Localize "CSS" into Catalan
  • Then, localize "Using_CSS_Transitions" into Catalan
  • "Using_CSS_Transitions" in Catalan should "CSS" in Catalan as its breadcrumb parent

Spot check topic stub generation:

  • Create en-US documents like:
    • /en-US/docs/HTML5
    • /en-US/docs/HTML5/test
  • Localize "test" into Catalan, but not "HTML5"
  • "test" will have an "HTML5" breadcrumb in Catalan, but "HTML5" in Catalan will be an auto-created stub with en-US content

@groovecoder
Copy link
Copy Markdown
Contributor

looking at this ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8 whitespace on blank line

@groovecoder
Copy link
Copy Markdown
Contributor

pep8 & pyflakes nits. also should we do something about this? http://screencast.com/t/SNUerGGPs2DT

aside from that r+ - very cool!

@lmorchard
Copy link
Copy Markdown
Contributor Author

I'm not sure what you're pointing at in that screenshot, but might be worth a follow-up bug?

Added another commit for a couple of spots for pep8, but didn't try fixing the whole file

@groovecoder
Copy link
Copy Markdown
Contributor

Pointing at the Parent: field missing from the translation side of the page. If we know what the translation's parent is going to be, we should display it (non-editable) there, right?

@lmorchard
Copy link
Copy Markdown
Contributor Author

Like I said, file a follow-up bug? (ie. Is that the right UI assumption? Should it be non-editable? Is it worth displaying, etc)

@groovecoder
Copy link
Copy Markdown
Contributor

Sounds good to me - let the users decide to file a follow-up bug if/when it's important.

groovecoder added a commit that referenced this pull request Oct 1, 2012
fix bug 792418: Build sensible default topic structure for translations
@groovecoder groovecoder merged commit 0f1887d into mdn:master Oct 1, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants