Skip to content

Commit

Permalink
I18N-1293 - Invalid text unit info modal if browser back button used
Browse files Browse the repository at this point in the history
Hid all the modals when the workbench component is unmounted
  • Loading branch information
DarKhaos committed Oct 10, 2024
1 parent dd07faa commit 48f04b0
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 30 deletions.
8 changes: 4 additions & 4 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 100 additions & 25 deletions webapp/src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ server.port=8080
server.error.include-message=always

# FLYWAY
spring.flyway.enabled=false
#spring.flyway.enabled=false

# JPA / ENVERS
spring.jpa.properties.org.hibernate.envers.audit_strategy=org.hibernate.envers.strategy.ValidityAuditStrategy
Expand All @@ -34,11 +34,11 @@ spring.jpa.properties.org.hibernate.envers.track_entities_changed_in_revision=tr
# it false break cli tests
#spring.jpa.open-in-view=false

spring.datasource.url=jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1
#spring.datasource.url=jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1
# adding defer-datasource-initialization=true means we must set it to false in the production profile, else it is
# conflicting with Flyway. I'd expect that parameter to not do anything for non-embedded database but it does conflict
# with Flyway regardless. So this is not great but don't have a better solution at the moment.
spring.jpa.defer-datasource-initialization=true
#spring.jpa.defer-datasource-initialization=true
spring.sql.init.schema-locations=classpath:/db/hsql/schema.sql
spring.sql.init.data-locations=classpath:/db/hsql/data.sql
spring.datasource.hikari.maximum-pool-size=30
Expand Down Expand Up @@ -185,15 +185,7 @@ spring.session.jdbc.table-name=SPRING_SESSION_V2


# Slack client
#l10n.slackClients.slack-bot-name-here.token=xxx-yyy-zzz

# Integrity Check Notifier Warnings
#l10n.integrity-check-notifier.enabled=true
# Default Slack client to use for sending warnings
#l10n.integrity-check-notifier.slackClientId=slack-bot-name-here
#l10n.integrity-check-notifier.slackChannel=#name-of-channel-for-warnings
#l10n.integrity-check-notifier.warnings.html-tag.title=Tag Mismatch In Translated String
#l10n.integrity-check-notifier.warnings.html-tag.text=The source and target string have a mismatch in their tags.
#l10n.slack.token=xxx-yyy-zzz

# Phabricator client
#l10n.phabricator.token=api-xyz
Expand All @@ -214,7 +206,7 @@ spring.session.jdbc.table-name=SPRING_SESSION_V2
#l10n.link.{repository}.location.url=https://opengrok.someplace.com/xref/${openGrokRepository}
#l10n.link.{repository}.location.extractedPrefix=/some/extractor/prefix/
#l10n.link.{repository}.location.label=${openGrokRepository}
#l10n.link.{repository}.location.useUsage=True
#l10n.link.{repository}.location.useUsage=true
#l10n.link.{repository}.pullRequest.url=https://secure.phabricator.com/${branchName}


Expand All @@ -230,7 +222,7 @@ spring.session.jdbc.table-name=SPRING_SESSION_V2

#l10n.link.{repository2}.location.url=https://someotherplace.com/xref/${textUnitName}
#l10n.link.{repository2}.location.label=${textUnitName}
#l10n.link.{repository2}.location.useUsage=False
#l10n.link.{repository2}.location.useUsage=false

# Google Analytics
#l10n.googleAnalytics.enabled=true
Expand All @@ -253,14 +245,97 @@ spring.session.jdbc.table-name=SPRING_SESSION_V2
#l10n.blob-storage.s3.bucket=mojito
#l10n.blob-storage.s3.prefix=mojito

# PagerDuty - Value is an integration key for 'Events API v2' integration
#l10n.pagerduty.integrations.default=xxxyyyzzz

# Adjust the number of retries and delay between retries for the PagerDuty client
# l10n.pagerduty.retry.maxRetries=5
# Minimum back off delay in milliseconds
# l10n.pagerduty.retry.minBackOffDelay=500
# Maximum back off delay in milliseconds
# l10n.pagerduty.retry.maxBackOffDelay=5000


# ### SQL DEBUGGING
#spring.jpa.properties.hibernate.generate_statistics=true
#spring.jpa.properties.hibernate.show_sql=true
#spring.jpa.properties.hibernate.format_sql=true
#logging.level.org.hibernate.SQL=DEBUG

# # PARAMS:
#logging.level.org.hibernate.type=TRACE
#logging.level.org.hibernate.engine.query.spi.HQLQueryPlan=TRACE

spring.flyway.enabled=true
spring.jpa.defer-datasource-initialization=false
l10n.flyway.clean=false
spring.datasource.url=jdbc:mysql://localhost:3306/mojitodb?characterEncoding=UTF-8&useUnicode=true
spring.datasource.username=mojito
spring.datasource.password=password1
spring.datasource.driverClassName=com.mysql.jdbc.Driver

l10n.org.quartz.jobStore.useProperties=true
l10n.org.quartz.scheduler.instanceId=AUTO
l10n.org.quartz.jobStore.isClustered=true
l10n.org.quartz.threadPool.threadCount=10
l10n.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
l10n.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
l10n.org.quartz.jobStore.dataSource=myDS
l10n.org.quartz.dataSource.myDS.provider=hikaricp
l10n.org.quartz.dataSource.myDS.driver=com.mysql.jdbc.Driver
l10n.org.quartz.dataSource.myDS.URL=jdbc:mysql://localhost:3306/mojitodb?characterEncoding=UTF-8&useUnicode=true
l10n.org.quartz.dataSource.myDS.user=mojito
l10n.org.quartz.dataSource.myDS.password=password1
l10n.org.quartz.dataSource.myDS.maxConnections=12
l10n.org.quartz.dataSource.myDS.validationQuery=select 1

spring.flyway.driver-class-name=com.mysql.jdbc.Driver
spring.flyway.url=jdbc:mysql://localhost:3306/mojitodb?characterEncoding=UTF-8&useUnicode=true
spring.flyway.user=mojito
spring.flyway.password=password1

l10n.smartling.clientID=tinbznavwfwvadmltylpjrhwqpofpl
l10n.smartling.clientSecret=s3u7m1opom00qvmcqhh2u4fq7oDR_jkc6ha73r308nelbpmd751vqdf
l10n.ThirdPartyTMS.impl=ThirdPartyTMSSmartling
l10n.smartling.accountId=128217e07

l10n.link.android.location.url=https://github.com/search?q=repo:"pinternal/android"+path:"${assetPath}"+"${textUnitName}"&type=code
l10n.link.android.location.label=${assetPath}/${textUnitNameInSource}
l10n.link.android.location.useUsage=false
l10n.link.android.commit.url=https://github.com/pinternal/android/commit/${commit}
l10n.link.android.commit.label=${commit}
l10n.link.android.thirdParty.url=https://dashboard.smartling.com/app/projects/45cb8ac6c/strings/?hashcodes=${thirdPartyTextUnitId}
l10n.link.android.thirdParty.label=Search in Smartling
l10n.link.android.pullRequest.url=https://github.com/${branchName}
l10n.link.android.textUnitNameToTextUnitNameInSource.singular=(.*)
l10n.link.android.textUnitNameToTextUnitNameInSource.plural=(.*)_(zero|one|two|few|many|other)$

l10n.link.webapp.location.url=https://github.com/pinternal/pinboard/blob/master/${filePath}#L${lineNumber}
l10n.link.webapp.location.extractorPrefixRegex=/mnt/pinboard/
l10n.link.webapp.location.label=${usage}
l10n.link.webapp.location.useUsage=true
l10n.link.webapp.commit.url=https://github.com/pinternal/pinboard/commit/${commit}
l10n.link.webapp.commit.label=${commit}
l10n.link.webapp.thirdParty.url=https://dashboard.smartling.com/app/projects/89bed53e6/strings/?hashcodes=${thirdPartyTextUnitId}
l10n.link.webapp.thirdParty.label=Search in Smartling
l10n.link.webapp.pullRequest.url=https://github.com/${branchName}

l10n.link.pinboard.location.url=https://github.com/pinternal/pinboard/blob/master/${filePath}#L${lineNumber}
l10n.link.pinboard.location.label=${usage}
l10n.link.pinboard.location.useUsage=true
l10n.link.pinboard.commit.url=https://github.com/pinternal/pinboard/commit/${commit}
l10n.link.pinboard.commit.label=${commit}
l10n.link.pinboard.thirdParty.url=https://dashboard.smartling.com/app/projects/f98185df6/strings/?hashcodes=${thirdPartyTextUnitId}
l10n.link.pinboard.thirdParty.label=Search in Smartling
l10n.link.pinboard.pullRequest.url=https://github.com/${branchName}

#l10n.blob-storage.s3.bucket=pinterest-maryville
#l10n.blob-storage.s3.prefix=mojito-dev
#l10n.asset-content-service.storage.type=s3Fallback
#l10n.blob-storage.type=s3
#l10n.aws.s3.enabled=true
#l10n.aws.s3.access-key-id=
#l10n.aws.s3.access-key-secret=
#l10n.aws.s3.region=us-east-1

#l10n.branchNotification.notifiers.github.github-pinternal.owner=pinternal
#l10n.branchNotification.notifiers.github.github-pinternal.messages.newNotificationMsgFormat={message}{link}\n\n{strings}\n\n\
# _Need more information? Check [how to provide screenshots](http://pinch.pinadmin.com/glow-screenshot) and read about [translation times](http://pinch.pinadmin.com/glow-translation-times) in the [Glow! documentation](http://pinch.pinadmin.com/glow)._
#l10n.branchNotification.notifiers.github.github-pinternal.messages.newStrings=:globe_with_meridians: We received your strings! Please **add screenshots** :camera_flash: before the cutoff time at **3pm PST** and **wait for translations** before releasing.
#l10n.branchNotification.notifiers.github.github-pinternal.messages.updatedNotificationMsgFormat={message}{link}\n\n{strings}\n\n\
# _Need more information? Check [how to provide screenshots](http://pinch.pinadmin.com/glow-screenshot) and read about [translation times](http://pinch.pinadmin.com/glow-translation-times) in the [Glow! documentation](http://pinch.pinadmin.com/glow)._
#l10n.branchNotification.notifiers.github.github-pinternal.messages.updatedStrings=:new: Your branch was updated with new strings! Please **add screenshots** :camera_flash: before the cutoff time at **3pm PST** and **wait for translations** before releasing.
#l10n.branchNotification.notifiers.github.github-pinternal.messages.screenshotsMissing=Please provide screenshots to help the localization team before the **3pm PST** cutoff time.\n\n\
# _Need more information? Check [how to provide screenshots](http://pinch.pinadmin.com/glow-screenshot) and read about [translation times](http://pinch.pinadmin.com/glow-translation-times) in the [Glow! documentation](http://pinch.pinadmin.com/glow)._
#l10n.branchNotification.notifiers.github.github-pinternal.messages.translationsReady=Translations are ready in [Mojito](https://mojito.pinadmin.com/branches?searchText={branchName}&deleted=true&onlyMyBranches=false) and you will \
# have them in GitHub soon! :tada:\n\nThey will be pushed [automatically](https://github.com/search?q=repo%3Apinternal%2F{githubRepository}+%5Bauto-l10n%5D&type=commits&s=committer-date&o=desc) to the **master** branch a few hours after your PR is merged. \
# You can then rebase your branch off the latest **master** branch in order to see the translations working locally.\n\n_Need more information? Check [the documentation](http://pinch.pinadmin.com/glow)_.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ import AuthorityService from "../../utils/AuthorityService";

let Workbench = createReactClass({
displayName: 'Workbench',

componentWillUnmount() {
GitBlameActions.close();
GitBlameScreenshotViewerActions.closeScreenshotsViewer();
TranslationHistoryActions.close();
ShareSearchParamsModalActions.close();
},
render: function () {
return (
<div>
Expand Down

0 comments on commit 48f04b0

Please sign in to comment.