Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: add fallback texts to placeholder text #690

Merged
merged 3 commits into from
Sep 14, 2020
Merged

Conversation

thewahome
Copy link
Collaborator

@thewahome thewahome commented Sep 11, 2020

Overview

Adds a function to be used to generate fallback texts to words which have not been translated yet.
Word here is used to mean one word or a phrase

If a word has no translation available in a new language but available in the default en-US transalation files, the en-US translation is displayed.
If the word is also not available in the en-US translation files, the word itself is displayed

Fixes #490

Demo

  1. Translation unavailable in French, available in English
    -- word = Graph Toolkit
    -- translation = Toolkit component

image

  1. Translation unavailable in both French and English
    -- word = Graph Toolkits
    -- translation = Graph Toolkits

image

@thewahome thewahome merged commit 4419110 into dev Sep 14, 2020
thewahome added a commit that referenced this pull request Sep 16, 2020
* chore(release): 4.1.4

* add 4.1.4 build files

* chore(release): 4.1.5

* add version 4.1.5 build files

* fix copy paste failure when query bar is empty

* HB of localized GE.jsons (#660)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* change multiline property

* remove main tag

* Fix: sovereign clouds metadata (#676)

* fix crashing when fetching soverign metadata

* remove dead code

* add comment to explain why only the first value is taken

* Feature: Add Graph toolkit tab (#452)

* create graph toolkit views

* add localisation for missing graph toolkit

* move implementation to json file and use succinct code

* display open in mgtdev message and change missing toolkit text

* adds source to example url

* add new examples. move file to root of project

* updates icon in code snippet

* fixes messaging changes requested

* removes unnecessary period

* display blue dot on supported queries

* add space to 'no toolkit' messaging

* display text and icon in mobile view

* Feature: History items ttl (#677)

* show history items younger than 30 days, remove the rest

* change terminology to expiry

* flip expiry check

* Fix: add fallback texts to placeholder text (#690)

* create function to provide fallback texts for placeholder texts

* display object value

* add fallback text translator to pivot items

* Localize tooltip message

* add render details header function

* add tooltip on 'admin consent required' header

* remove unnecessary white space

* add translate message function

* add tooltip on permissions panel

* Fix: remove unnecessary code snippets tab (#695)

* Task: update azure pipeline (#691)

* create drop files and version number variable

* remove publish code coverage results

* remove conditions when publishing artifacts

* temporarily pause reporting pipeline failure

* change to ubuntu-latest

* display sources directory

* Change to default working directory

* reset to build sources directory

* pause deployment

* vs2017-win2016

* remove set version number

* temporarily pause the notification task

* change vmImage

* fix merge conflicts

* add build id

* remove name from pipeline

* comment deployment steps

* remove name from build

* add test coverage back to pipeline

* remove build folder from source code

* add build folder to .gitignore

* skip tag creation, change version script

* remove condition so that there is always a build folder

* disable unwanted steps

* adds triggers and filters to the steps

* split pipeline to two jobs

* add display name

* rename job id

* add job dependency on previous task

* move publishing tasks to publishing job

* run npm install before publish

* add date to run name

* remove source branch from name

* publish code coverage results

* remove publish code coverage task

* change position of setversion number;
add condition

* update version to latest

* remove disabled tasks

* Task: HandBack of localized GE.jsons (#698)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Task: Reduce padding/spacing on request header  (#696)

* remove excess padding

* remove styling

* remove break

* chore(release): 4.1.7

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>
thewahome added a commit that referenced this pull request Sep 29, 2020
* Feature: History items ttl (#677)

* Fix: add fallback texts to placeholder text (#690)

* Task: Reduce padding/spacing on request header  (#696)

* Task: removes depracated setConsent method (#703)

* chore(release): 4.1.9

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>
thewahome added a commit that referenced this pull request Oct 22, 2020
* chore(release): 4.1.9 (#716)

* Feature: History items ttl (#677)

* Fix: add fallback texts to placeholder text (#690)

* Task: Reduce padding/spacing on request header  (#696)

* Task: removes depracated setConsent method (#703)

* chore(release): 4.1.9

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>

* chore(release): 4.1.10

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>
thewahome added a commit that referenced this pull request Nov 20, 2020
* package.json

* chore(release): 4.1.4

* add 4.1.4 build files

* chore(release): 4.1.5

* add version 4.1.5 build files

* fix copy paste failure when query bar is empty

* HB of localized GE.jsons (#660)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* change multiline property

* remove main tag

* Fix: sovereign clouds metadata (#676)

* fix crashing when fetching soverign metadata

* remove dead code

* add comment to explain why only the first value is taken

* Feature: Add Graph toolkit tab (#452)

* create graph toolkit views

* add localisation for missing graph toolkit

* move implementation to json file and use succinct code

* display open in mgtdev message and change missing toolkit text

* adds source to example url

* add new examples. move file to root of project

* updates icon in code snippet

* fixes messaging changes requested

* removes unnecessary period

* display blue dot on supported queries

* add space to 'no toolkit' messaging

* display text and icon in mobile view

* Feature: History items ttl (#677)

* show history items younger than 30 days, remove the rest

* change terminology to expiry

* flip expiry check

* Fix: add fallback texts to placeholder text (#690)

* create function to provide fallback texts for placeholder texts

* display object value

* add fallback text translator to pivot items

* Localize tooltip message

* add render details header function

* add tooltip on 'admin consent required' header

* remove unnecessary white space

* add translate message function

* add tooltip on permissions panel

* Fix: remove unnecessary code snippets tab (#695)

* Task: update azure pipeline (#691)

* create drop files and version number variable

* remove publish code coverage results

* remove conditions when publishing artifacts

* temporarily pause reporting pipeline failure

* change to ubuntu-latest

* display sources directory

* Change to default working directory

* reset to build sources directory

* pause deployment

* vs2017-win2016

* remove set version number

* temporarily pause the notification task

* change vmImage

* fix merge conflicts

* add build id

* remove name from pipeline

* comment deployment steps

* remove name from build

* add test coverage back to pipeline

* remove build folder from source code

* add build folder to .gitignore

* skip tag creation, change version script

* remove condition so that there is always a build folder

* disable unwanted steps

* adds triggers and filters to the steps

* split pipeline to two jobs

* add display name

* rename job id

* add job dependency on previous task

* move publishing tasks to publishing job

* run npm install before publish

* add date to run name

* remove source branch from name

* publish code coverage results

* remove publish code coverage task

* change position of setversion number;
add condition

* update version to latest

* remove disabled tasks

* Task: HandBack of localized GE.jsons (#698)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Task: Reduce padding/spacing on request header  (#696)

* remove excess padding

* remove styling

* remove break

* Release: sept 2020 (#701)

* Release: july 2020 2 (#650)

* chore(release): 4.1.5

* add version 4.1.5 build files

* Release: august 2020 (#662)

* chore(release): 4.1.4

* add 4.1.4 build files

* chore(release): 4.1.5

* add version 4.1.5 build files

* fix copy paste failure when query bar is empty

* HB of localized GE.jsons (#660)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* chore(release): 4.1.6

* create 4.1.6 build files

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* chore(release): 4.1.7

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Task: removes depracated setConsent method (#703)

* Task: Change adaptive cards message  (#704)

* remove excess padding

* remove styling

* remove break

* Change adaptive card message

* format localized string

* add label styles

* refactor code

* capitalize words

* add query status check

* rename labelStyles property

* Telemetry for Graph Explorer usage (#672)

* Capture telemetry data for actions on History tab

* Capture telemetry data for actions on Sample Queries tab

* Capture telemetry data for theme change actions

* Capture telemetry data for office dev program link click

* Capture telemetry data for Graph API version change event

* Capture telemetry data for Adaptive Cards tab click

* Capture telemetry data for Code Snippets click and copy events

* Update .gitignore file

* Remove QueryUrl from history item telemetry data

* Capture old version and new version telemetry data on version change

* Update query version comparison to strict equality comparison

* Capture telemetry data for clicking history tab on header click

* Capture telemetry data for Permissions and Auth tab click events

* Fix imports ordering

* Add telemetry for tabs in query response section

* Rename RUN_QUERY_EVENT

* Update how we send telemetry data for custom events

* Add property to telemetry data to report if a user was authenitcated or not during an event

* Update method for collecting telemetry data for request tabs

* Update azure-pipelines to use a different AppInsights instrumentation key for staging

* Track component usage for permissions, auth, snippets and history tabs

* Provide name of component for AppInsights React component tracking

* Use interface as type instead of any when tracking documentation link click event

* Enable telemetry

* Rename telemetry custom property from QueryUrl to QuerySignature

* Disable telemetry if AppInsights instrumentation key does not exist

* HB of localized GE.jsons (#727)

* HB of localized GE.jsons

Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Task: display history items ttl message (#733)

* Fix: create onenote page (#708)

* display the page content in the request body

* fix linting errors

* add appropriate content type header

* remove filter for content-type header

* refine comment for clarity

* upgrade to the latest javascript sdk

* remove content type header checks

* simplify json content check

* refactor code to be concise

* Format code on save and paste

* Fix: breaking change with the adaptive cards templating library (#735)

* update adaptive card templating library

* fix breaking change

* fix linting error

* fix formatting

* HB of localized GE.jsons (#742)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Release: October 2020 (#748)

* chore(release): 4.1.9 (#716)

* Feature: History items ttl (#677)

* Fix: add fallback texts to placeholder text (#690)

* Task: Reduce padding/spacing on request header  (#696)

* Task: removes depracated setConsent method (#703)

* chore(release): 4.1.9

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>

* chore(release): 4.1.10

Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>

* Fix: duplicate aria labels (#752)

* Update aria-label

* localize aria labels

* HB of localized GE.jsons (#757)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* Adding JWT.ms support in the Access Token view (#754)

* Adding JWT.ms support in the Access Token view

* Adding translate method

* Removing the translated keys.

* format code to pass linting check

Authored-by: Sebastien <@sebastienlevert>
Co-authored-by: Elinor <ekaguongo@gmail.com>

* descriptive message after pop-up blocked in browser (#762)

* descriptive message after pop-up blocked in browser

* fix lint

* add message translation

* Fix: focus order (#763)

* restructure pivot items

* add 'expand' and 'share' options as pivot items

* add pivot items styling

* Remove color

* Add tooltips

* remove unused function

* add translateMessage function

* HB of localized GE.jsons (#767)

Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>

* chore(release): 4.1.11

Co-authored-by: jobala <japhethobalak@gmail.com>
Co-authored-by: OfficeGlobal <47977325+OfficeGlobal@users.noreply.github.com>
Co-authored-by: OfficeGlobal <OfficeGlobal@microsoft.com>
Co-authored-by: Azure Static Web Apps <opensource@microsoft.com>
Co-authored-by: Elinor <ekaguongo@gmail.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Sébastien Levert <sebastienlevert@users.noreply.github.com>
Co-authored-by: Ezrqn Kemboi <ezrqnkemboi@gmail.com>
@thewahome thewahome deleted the fix/fallback-texts branch February 17, 2021 11:34
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.

Some strings do not have fallback texts
2 participants