Skip to content

Commit

Permalink
Change the "Download Android app" button (oppia#20887)
Browse files Browse the repository at this point in the history
* change download to get

* updates

* updates

* updates
  • Loading branch information
AkashPaloju authored Aug 25, 2024
1 parent 1e0ef63 commit 2fd4a85
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
"I18N_ACTION_BROWSE_LIBRARY": "Browse library",
"I18N_ACTION_CREATE_EXPLORATION": "Create an Exploration",
"I18N_ACTION_CREATE_LESSON": "Create your own Lesson",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "Download the Android app",
"I18N_ACTION_EXPLORE_LESSONS": "Explore lessons",
"I18N_ACTION_GET_ANDRIOD_APP": "Get the Android App",
"I18N_ACTION_GUIDE_FOR_TEACHERS": "Guide for teachers",
"I18N_ACTION_TIPS_FOR_PARENTS": "Tips for parents and guardians",
"I18N_ACTION_VIEW_LESSONS": "View lessons",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
"I18N_ACTION_BROWSE_LIBRARY": "Explorar biblioteca",
"I18N_ACTION_CREATE_EXPLORATION": "Crea tu propia exploración",
"I18N_ACTION_CREATE_LESSON": "Crea tu propia lección",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "Descarga la aplicación para Android",
"I18N_ACTION_EXPLORE_LESSONS": "Explora lecciones",
"I18N_ACTION_GET_ANDRIOD_APP": "Descarga la aplicación para Android",
"I18N_ACTION_GUIDE_FOR_TEACHERS": "Guía para maestros",
"I18N_ACTION_TIPS_FOR_PARENTS": "Consejos para padres y guardianes",
"I18N_ACTION_VISIT_CLASSROOM": "Visitar el aula",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"I18N_ACTION_BROWSE_LESSONS": "Esplora le nostre lezioni",
"I18N_ACTION_CREATE_EXPLORATION": "Crea un'esplorazione",
"I18N_ACTION_CREATE_LESSON": "Crea la tua lezione",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "Scarica l'applicazione per Android",
"I18N_ACTION_EXPLORE_LESSONS": "Esplora le lezioni",
"I18N_ACTION_GET_ANDRIOD_APP": "Scarica l'applicazione per Android",
"I18N_ADD_NEW_SYLLABUS_CANCEL_BUTTON_TEXT": "Annulla",
"I18N_ANDROID_PAGE_AVAILABLE_FOR_DOWNLOAD_TEXT": "Inizia oggi a imparare gratuitamente su Android",
"I18N_ANDROID_PAGE_EMAIL_FIELD_LABEL": "Indirizzo email",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/lb.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"I18N_ABOUT_PAGE_TABS_FOUNDATION": "Fondatioun",
"I18N_ABOUT_PAGE_TITLE": "Iwwer | Oppia",
"I18N_ACTION_CREATE_LESSON": "Eege Lektioun uleeën",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "Luet d'Android-App erof",
"I18N_ACTION_GET_ANDRIOD_APP": "Luet d'Android-App erof",
"I18N_ADD_NEW_SYLLABUS_CANCEL_BUTTON_TEXT": "Ofbriechen",
"I18N_ADD_NEW_SYLLABUS_DONE_BUTTON_TEXT": "Fäerdeg",
"I18N_ANDROID_PAGE_EMAIL_FIELD_LABEL": "E-Mail-Adress",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@
"I18N_ACTION_BROWSE_LIBRARY": "Bibliotheek bekijken",
"I18N_ACTION_CREATE_EXPLORATION": "Maak een verkenning",
"I18N_ACTION_CREATE_LESSON": "Je eigen les maken",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "De Android-app downloaden",
"I18N_ACTION_EXPLORE_LESSONS": "Lessen verkennen",
"I18N_ACTION_GET_ANDRIOD_APP": "De Android-app downloaden",
"I18N_ACTION_GUIDE_FOR_TEACHERS": "Gids voor docenten",
"I18N_ACTION_TIPS_FOR_PARENTS": "Tips voor ouders en begeleiders",
"I18N_ACTION_VISIT_CLASSROOM": "Klaslokaal bezoeken",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
"I18N_ACTION_BROWSE_LIBRARY": "Button below text in last section of Oppia's About page targeting the library.",
"I18N_ACTION_CREATE_EXPLORATION": "Text displayed in a button on the Home and Teach pages. - When the user clicks the button they are taken to their dashboard, and a dialog is opened where the user can create a new exploration.",
"I18N_ACTION_CREATE_LESSON": "Text displayed in a button on the Home page. - When the user clicks the button they are taken to their dashboard, and a dialog is opened where the user can create a new exploration. The text in the button needs to be less than 29 characters long.",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "Text displayed on the Android button of the About page which on click redirects users to the Android page.",
"I18N_ACTION_EXPLORE_LESSONS": "Third button in last section of Oppia's About page targeting lessons in library.",
"I18N_ACTION_GET_ANDRIOD_APP": "Text displayed on the Android button of the About page which on click redirects users to the Android page.",
"I18N_ACTION_GUIDE_FOR_TEACHERS": "First button in last section of Oppia's About page targeting guide for teachers page.",
"I18N_ACTION_TIPS_FOR_PARENTS": "Second button in last section of Oppia's about page targeting tips for parents and guardians page.",
"I18N_ACTION_VIEW_LESSONS": "Text on a button in Oppia's teach page targeting lessons in library.",
Expand Down
2 changes: 1 addition & 1 deletion assets/i18n/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
"I18N_ACTION_BROWSE_LIBRARY": "瀏覽圖書館",
"I18N_ACTION_CREATE_EXPLORATION": "建立一個探索",
"I18N_ACTION_CREATE_LESSON": "建立您的課程",
"I18N_ACTION_DOWNLOAD_ANDRIOD_APP": "下載 Android 應用程式",
"I18N_ACTION_EXPLORE_LESSONS": "瀏覽課程",
"I18N_ACTION_GET_ANDRIOD_APP": "下載 Android 應用程式",
"I18N_ACTION_GUIDE_FOR_TEACHERS": "導師指南",
"I18N_ACTION_TIPS_FOR_PARENTS": "給家長與監護人的提示",
"I18N_ACTION_VISIT_CLASSROOM": "參訪教室",
Expand Down
6 changes: 3 additions & 3 deletions core/templates/pages/about-page/about-page.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
bottom: -58px;
}
}
@media only screen and (max-width: 361px) {
@media only screen and (max-width: 376px) {
.about-page .oppia-about-partnerships-section br {
display: none;
}
Expand Down Expand Up @@ -669,7 +669,7 @@
}
}

@media only screen and (max-width: 361px) {
@media only screen and (max-width: 376px) {
.about-page .oppia-mobile-portrait-content {
display: block;
}
Expand Down Expand Up @@ -1469,7 +1469,7 @@
padding-bottom: 46px;
}
}
@media only screen and (max-width: 361px) {
@media only screen and (max-width: 376px) {
.about-page .oppia-about-platform-section {
gap: 40px;
padding: 0 20px 56px;
Expand Down
4 changes: 2 additions & 2 deletions core/templates/pages/about-page/about-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ <h2 class="oppia-about-hero-title">
</oppia-primary-button>
<oppia-primary-button
buttonHref="/android"
(onClickPrimaryButton)="onClickDownloadAndroidAppButton()"
(onClickPrimaryButton)="onClickGetAndroidAppButton()"
[customClasses]="['oppia-about-platform-button', 'oppia-about-secondary-button', 'oppia-about-platform-subtext']"
buttonText="{{ 'I18N_ACTION_DOWNLOAD_ANDRIOD_APP' | translate }}">
buttonText="{{ 'I18N_ACTION_GET_ANDRIOD_APP' | translate }}">
</oppia-primary-button>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions core/templates/pages/about-page/about-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ describe('About Page', () => {
it('should register GA event when Download Android App is clicked', () => {
spyOn(
siteAnalyticsService,
'registerClickDownloadAndroidAppButtonEvent'
'registerClickGetAndroidAppButtonEvent'
).and.callThrough();
component.onClickDownloadAndroidAppButton();
component.onClickGetAndroidAppButton();
expect(
siteAnalyticsService.registerClickDownloadAndroidAppButtonEvent
siteAnalyticsService.registerClickGetAndroidAppButtonEvent
).toHaveBeenCalled();
});

Expand Down
4 changes: 2 additions & 2 deletions core/templates/pages/about-page/about-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ export class AboutPageComponent implements OnInit, OnDestroy {
this.siteAnalyticsService.registerClickExploreLessonsButtonEvent();
}

onClickDownloadAndroidAppButton(): void {
this.siteAnalyticsService.registerClickDownloadAndroidAppButtonEvent();
onClickGetAndroidAppButton(): void {
this.siteAnalyticsService.registerClickGetAndroidAppButtonEvent();
}

onClickDonateCTAButton(): void {
Expand Down
4 changes: 2 additions & 2 deletions core/templates/pages/teach-page/teach-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@
</oppia-primary-button>
<oppia-primary-button
[buttonHref]="androidUrl"
(onClickPrimaryButton)="onClickDownloadAndroidAppButton()"
(onClickPrimaryButton)="onClickGetAndroidAppButton()"
[customClasses]="['oppia-teach-btn', 'oppia-teach-secondary-btn', 'e2e-test-teach-page-download-android-app-button']"
buttonText="{{ 'I18N_ACTION_DOWNLOAD_ANDRIOD_APP' | translate }}">
buttonText="{{ 'I18N_ACTION_GET_ANDRIOD_APP' | translate }}">
</oppia-primary-button>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions core/templates/pages/teach-page/teach-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ describe('Teach Page', () => {
it('should regiester GA event when Download Android App is clicked', () => {
spyOn(
siteAnalyticsService,
'registerClickDownloadAndroidAppButtonEvent'
'registerClickGetAndroidAppButtonEvent'
).and.callThrough();
component.onClickDownloadAndroidAppButton();
component.onClickGetAndroidAppButton();
expect(
siteAnalyticsService.registerClickDownloadAndroidAppButtonEvent
siteAnalyticsService.registerClickGetAndroidAppButtonEvent
).toHaveBeenCalled();
});

Expand Down
4 changes: 2 additions & 2 deletions core/templates/pages/teach-page/teach-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ export class TeachPageComponent implements OnInit, OnDestroy, AfterViewInit {
this.siteAnalyticsService.registerClickExploreLessonsButtonEvent();
}

onClickDownloadAndroidAppButton(): void {
this.siteAnalyticsService.registerClickDownloadAndroidAppButtonEvent();
onClickGetAndroidAppButton(): void {
this.siteAnalyticsService.registerClickGetAndroidAppButtonEvent();
}

registerFirstTimePageViewEvent(): void {
Expand Down
6 changes: 3 additions & 3 deletions core/templates/services/site-analytics.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,12 @@ describe('Site Analytics Service', () => {
});
});

it('should register Download the Android App button click event', () => {
sas.registerClickDownloadAndroidAppButtonEvent();
it('should register Get the Android App button click event', () => {
sas.registerClickGetAndroidAppButtonEvent();

expect(gtagSpy).toHaveBeenCalledWith(
'event',
'download_android_app_button_click',
'get_android_app_button_click',
{
page_path: pathname,
}
Expand Down
4 changes: 2 additions & 2 deletions core/templates/services/site-analytics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ export class SiteAnalyticsService {
});
}

registerClickDownloadAndroidAppButtonEvent(): void {
this._sendEventToGoogleAnalytics('download_android_app_button_click', {
registerClickGetAndroidAppButtonEvent(): void {
this._sendEventToGoogleAnalytics('get_android_app_button_click', {
page_path: this.windowRef.nativeWindow.location.pathname,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ describe('Parent/Teacher', function () {
await loggedOutUser.clickExploreLessonsButtonAtTheBottomInTeachPage();
// Navigating back.
await loggedOutUser.navigateToTeachPage();
// Navigating to "Andriod page" by clicking on the "Download Andriod app" button.
await loggedOutUser.clickDownloadAndriodAppButtonInTeachPage();
// Navigating to "Andriod page" by clicking on the "Get Android App" button.
await loggedOutUser.clickGetAndroidAppButtonInTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const exploreLessonsButtonAtTheTopInTeachPage =
'.e2e-test-teach-page-explore-lessons-button-at-the-top';
const exploreLessonsButtonAtTheBottomInTeachPage =
'.e2e-test-teach-page-explore-lessons-button-at-the-bottom';
const downloadAndroidAppButtonInTeachPage =
const getAndroidAppButtonInTeachPage =
'.e2e-test-teach-page-download-android-app-button';
const creatorsCarouselSelectorInTeachPage =
'.e2e-test-teach-page-creators-carousel';
Expand Down Expand Up @@ -1486,13 +1486,13 @@ export class LoggedOutUser extends BaseUser {
}

/**
* Function to click the Download Andriod app button in the Teach page
* Function to click the Get Android App button in the Teach page
* and check if it opens the Android page.
*/
async clickDownloadAndriodAppButtonInTeachPage(): Promise<void> {
async clickGetAndroidAppButtonInTeachPage(): Promise<void> {
await this.clickButtonToNavigateToNewPage(
downloadAndroidAppButtonInTeachPage,
'Download Andriod app button',
getAndroidAppButtonInTeachPage,
'Get Android App button',
androidUrl,
'Android page'
);
Expand Down

0 comments on commit 2fd4a85

Please sign in to comment.