Testing localization scripts with proper logs#825
Open
pranjal-glowingstar wants to merge 2 commits intomasterfrom
Open
Testing localization scripts with proper logs#825pranjal-glowingstar wants to merge 2 commits intomasterfrom
pranjal-glowingstar wants to merge 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
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
PS4and add start/end banners and runtime metrics. - Add pre/post run “visibility” logs (env/git/status, directory listings, checksums).
- Refactor formatting in
GetLocalizedFiles.shand 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Root cause
Fix
Validations
(how the change was tested, including both manual and automated tests)
Screenshots
Pull request checklist
This PR has considered: