question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate KS macros never used in en-US

See original GitHub issue

When I worked on https://github.com/mdn/yari/issues/1274 I noticed there are a lot more macros that would be considered never-used if you focus on the en-US content alone. For example:

MOZILLA/MDN/content  main ✔
▶ rg -i b2gonlyheader2

MOZILLA/MDN/content  main ✔
▶ cd ../translated-content

MOZILLA/MDN/translated-content  main ✔
▶ rg -i b2gonlyheader2
files/zh-tw/web/api/permissions_api/index.html
9:<p>{{ B2GOnlyHeader2('certified') }}</p>

So, that macro is never used in the en-US content, but it’s used in greater-than-zero places in the translated-content.

What we could do is edit these macros so they’re marked as deprecated and just return an empty string.

Here’s a complete list of macros that exist but are only used in translated-content:

kumascript/macros/CompatGeckoDesktop.ejs           8728
kumascript/macros/CompatibilityTable.ejs           8519
kumascript/macros/CompatGeckoMobile.ejs            6437
kumascript/macros/CompatVersionUnknown.ejs         5883
kumascript/macros/CompatUnknown.ejs                3950
kumascript/macros/languages.ejs                    1997
kumascript/macros/web.link.ejs                     1211
kumascript/macros/IncludeSubnav.ejs                699
kumascript/macros/CompatIE.ejs                     655
kumascript/macros/CompatSafari.ejs                 628
kumascript/macros/HTMLVersionInline.ejs            456
kumascript/macros/Obsolete_Header.ejs              454
kumascript/macros/英語版章題.ejs                        439
kumascript/macros/CSSTutorialTOC.ejs               182
kumascript/macros/previousPage.ejs                 158
kumascript/macros/nextPage.ejs                     151
kumascript/macros/DOM0.ejs                         151
kumascript/macros/CompatAndroid.ejs                143
kumascript/macros/jsOverrides.ejs                  121
kumascript/macros/訳注.ejs                           118
kumascript/macros/原語併記.ejs                         88
kumascript/macros/HTML5ArticleTOC.ejs              77
kumascript/macros/EditorGuideQuicklinks.ejs        42
kumascript/macros/gecko_callout_heading.ejs        38
kumascript/macros/IRCLink.ejs                      26
kumascript/macros/ref.ejs                          25
kumascript/macros/gecko_minversion_note.ejs        22
kumascript/macros/h1_gecko_minversion.ejs          20
kumascript/macros/FontAwesomeIcon.ejs              11
kumascript/macros/endnote.ejs                      11
kumascript/macros/h2_gecko_minversion.ejs          10
kumascript/macros/UserLink.ejs                     9
kumascript/macros/訳語.ejs                           6
kumascript/macros/LXRSearch.ejs                    2
kumascript/macros/tree.ejs                         2
kumascript/macros/B2GOnlyHeader2.ejs               1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mfuji09commented, Apr 21, 2021

There are four macros used in Japanese translation only. I agree with to remove them and to replace with other expressions. I will ask the l10n-ja community for help in removing them.

kumascript/macros/英語版章題.ejs 439 kumascript/macros/訳注.ejs 118 kumascript/macros/原語併記.ejs 88 kumascript/macros/訳語.ejs 6

1reaction
queengooborgcommented, May 12, 2022

Deprecation has been done in #6251 and #6252, now all that’s left is to remove them!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to deprecate a C pre-processor macro in GCC?
This way you force the user to e.g. add -DUSE_DEPRECATED_MACROS to their compiler options and they get a warning. Share. Share a link...
Read more >
Removing the annoying grayed out overlay of all macros ...
I'm not trying to ruin all the macros I typed up by typing the above and compound the problem by getting this: "...
Read more >
Useful Macro Information - Andrew Pitonyak
Use the information and macros in this document at your own risk. In the unlikely event that they cause the loss of some...
Read more >
Use __attribute__((deprecated)) to warn usage of ... - GitHub
Deprecated macros can be replaced by deprecated functions.
Read more >
R News - The Comprehensive R Archive Network
The use of sprintf and vsprintf from C/C++ has been deprecated in macOS 13 and ... R CMD check did not re-build vignettes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found