Only one branch was localized
My Shorts uploader builds a title, description, and hashtags for every video. Videos go out in three languages: ko, en, and ja. The copy comes from a per-language dictionary (L10N).
Hashtag assembly splits two ways depending on the app type. Web apps take the web branch, and native apps take the is_web=False branch. The web branch already handled language: it attached base tags that matched the video language and added category tags (CAT_TAGS) only to Korean videos.
The native-app branch didn't. It attached one fixed base-tag set, BASE_TAGS, whatever the language, and that set was in Korean. So an English or Japanese Short about an iOS app could go out with Korean base hashtags.
When you fixed language handling in your pipeline, did you check that the fix also reached the sibling branch that does the same job?
Why it went unnoticed
Nothing in this bug throws an error. Hashtags are a list of strings, and Korean strings are valid hashtags. The upload API accepts them and the video publishes normally. A check for "are tags attached?" passes. Nobody was checking "do these tags match the video's language?"
The web branch also already had localization in place, so the hashtag language issue looked solved. It had only been fixed in one of the two branches.
What would you do?
Would you add a second constant with the Korean tags translated into English, or would you move the tags into the place where per-language copy already lives?
The fix: base tags moved into the language dictionary
I didn't add a new constant. Instead I added a basetags key to each language (ko/en/ja) in the L10N dictionary, where per-language copy was already stored. The native-app branch now reads that language's basetags in place of BASE_TAGS.
Category tags now follow the same rule as the web branch: CAT_TAGS attach only to Korean videos. Both branches now follow one rule.
I also added a regression test. It builds metadata for an English iOS app and a Korean iOS app and checks the tags each one gets. The whole change is 8 lines in the upload script and 13 lines of tests.
Self-check
- Do any values that should differ by language (tags, CTA copy, links) still live as constants outside the language dictionary?
- When your code splits into branches like web/native, does language handling added to one branch also exist in the other?
- Do your tests check more than "tags exist" and confirm that an English video carries no Korean tags?
The honest part
I didn't count how many English or Japanese Shorts actually went out with Korean base tags before this fix. I have no record of going back to fix tags on videos already published. I also don't know how much wrong-language hashtags affected reach or search. What I know for sure is that the structure allowed it, that both branches now read the same language dictionary, and that tests now cover the English and Korean iOS app cases. The Japanese case isn't in this round of tests.