Skip to content

Testing localization scripts with proper logs#825

Open
pranjal-glowingstar wants to merge 2 commits intomasterfrom
pranjal/testingpipeline
Open

Testing localization scripts with proper logs#825
pranjal-glowingstar wants to merge 2 commits intomasterfrom
pranjal/testingpipeline

Conversation

@pranjal-glowingstar
Copy link
Collaborator

Problem

Root cause

Fix

Validations

(how the change was tested, including both manual and automated tests)

Screenshots

Before After
Screenshot or description before this change Screenshot or description with this change

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • Automated Tests
  • Documentation and demo app examples
  • VoiceOver and Keyboard Accessibility
  • Internationalization and RTL layouts
  • Size classes and window sizes (notched devices, multitasking, different window sizes, etc)

@pranjal-glowingstar pranjal-glowingstar requested a review from a team as a code owner March 19, 2026 17:33
Copilot AI review requested due to automatic review settings March 19, 2026 17:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds verbose tracing/logging to the localization scripts to aid debugging and validation of localization runs.

Changes:

  • Enable shell tracing with timestamped PS4 and add start/end banners and runtime metrics.
  • Add pre/post run “visibility” logs (env/git/status, directory listings, checksums).
  • Refactor formatting in GetLocalizedFiles.sh and expand curl verbosity/output diagnostics.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 23 comments.

File Description
localize.sh Adds extensive tracing and pre/post diagnostics; reformats and shortens localization fetch calls.
GetLocalizedFiles.sh Adds tracing and more verbose curl diagnostics; refactors parsing/loop logic and changes file handling behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +40
set -x
export PS4='+ $(date -u +"%Y-%m-%dT%H:%M:%SZ") localize.sh:${LINENO} -> '

echo "========== localize.sh START =========="
echo "PWD: $(pwd)"
echo "Args: $*"
echo "Timestamp: $(date -u +"%Y-%m-%dT%H:%M:%SZ")"

# =========================
# Env visibility
# =========================
echo "---- Environment ----"
env | sort
echo "---------------------"

# =========================
# Git visibility (before)
# =========================
echo "---- Git branch ----"
git branch --show-current

echo "---- Git HEAD ----"
git rev-parse HEAD

echo "---- Git status BEFORE ----"
git status --porcelain=v1

# =========================
# Directory snapshot (before)
# =========================
echo "---- Directory tree (depth 3) BEFORE ----"
find . -maxdepth 3 -type d

echo "---- Localization files BEFORE ----"
find . -path "*res/values*" -type f
Comment on lines +6 to +41
set -x
export PS4='+ $(date -u +"%Y-%m-%dT%H:%M:%SZ") localize.sh:${LINENO} -> '

echo "========== localize.sh START =========="
echo "PWD: $(pwd)"
echo "Args: $*"
echo "Timestamp: $(date -u +"%Y-%m-%dT%H:%M:%SZ")"

# =========================
# Env visibility
# =========================
echo "---- Environment ----"
env | sort
echo "---------------------"

# =========================
# Git visibility (before)
# =========================
echo "---- Git branch ----"
git branch --show-current

echo "---- Git HEAD ----"
git rev-parse HEAD

echo "---- Git status BEFORE ----"
git status --porcelain=v1

# =========================
# Directory snapshot (before)
# =========================
echo "---- Directory tree (depth 3) BEFORE ----"
find . -maxdepth 3 -type d

echo "---- Localization files BEFORE ----"
find . -path "*res/values*" -type f

Comment on lines +63 to +64
echo "Using Team ID: $TDBUILD_TEAM_ID"
echo "Using Alias: $TDBUILD_AAD_APPLICATION_CLIENT_ID"
Comment on lines +68 to +70
./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
-a $TDBUILD_AAD_APPLICATION_CLIENT_ID \
-p $TDBUILD_AAD_APPLICATION_CLIENT_SECRET \
# =========================
# Logging / tracing
# =========================
set -x
-r fluentui_controls \
-o fluentui_controls/src/main/res/values

./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
-r fluentui_core \
-o fluentui_core/src/main/res/values

./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
-r fluentui_drawer \
-o fluentui_drawer/src/main/res/values

./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
-r fluentui_listitem \
-o fluentui_listitem/src/main/res/values

./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
-r fluentui_menus \
-o fluentui_menus/src/main/res/values

./GetLocalizedFiles.sh -t $TDBUILD_TEAM_ID -u \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants