Skip to content

Instantly share code, notes, and snippets.

@patcon
Last active June 17, 2020 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patcon/a1763d0a4ad901eed9c59c9554e9347c to your computer and use it in GitHub Desktop.
Save patcon/a1763d0a4ad901eed9c59c9554e9347c to your computer and use it in GitHub Desktop.
Small script to find any strings in js/strings/en.js that are not used in client-participation codebase.
cd client-participation/js/strings/
cat en.js \
| grep '^ ' \
| cut -d '"' -f2 \
| xargs -E $'\n' sh -c 'for arg do echo "$arg"; git grep "s\.$arg" ../../ \
| cat; done' > used-strings.log
disagree
../stores/polis.js: if (consensusComments.disagree && consensusComments.disagree.length) {
../stores/polis.js: var disagrees = _.map(consensusComments.disagree, function(c) {
../templates/vote-view.handlebars: {{s.disagree}}
../views/participation.js: Array.prototype.push.apply(tidsToShow, mathMain.consensus.disagree.map(function(c) { return c.tid; }));
../../vis2/components/barChartCompact.js: <rect x={.5 + agree} width={disagree} y={.5} height={9} fill={globals.colors.disagree} />
../../vis2/components/exploreTid.js: fill: repfulForAgree ? globals.colors.agree : globals.colors.disagree
../../vis2/components/exploreTid.js: const repfulForDisagree = _.find(math.consensus.disagree, (r) => { return r.tid === selectedComment.tid });
../../vis2/components/exploreTid.js: fill: repfulForAgree ? globals.colors.agree : globals.colors.disagree
pass
../3rdparty/jquery.js: xhr.open( s.type, s.url, s.async, s.username, s.password );
../stores/polis.js: vote: polisTypes.reactions.pass,
../stores/polis.js: return v.get("vote") === polisTypes.reactions.pass;
../templates/vote-view.handlebars: {{s.pass}}
../views/participation.js: } else if (o.vote === window.polisTypes.reactions.pass) {
../../vis2/components/barChartCompact.js: <rect x={.5 + agree + disagree} width={pass} y={.5} height={9} fill={globals.colors.pass} />
../../vis2/components/exploreTid.js: vote: window.polisTypes.reactions.pass,
../../vis2/components/exploreTid.js: } else if (currentVote === window.polisTypes.reactions.pass) {
../../vis2/components/exploreTid.js: } else if (currentVote === window.polisTypes.reactions.pass) {
importantCheckbox
../templates/vote-view.handlebars: {{s.importantCheckbox}}
howImportantPrompt
howImportantLow
howImportantMedium
howImportantHigh
modSpam
../templates/vote-view.handlebars: {{s.modSpam}}
modOffTopic
../templates/vote-view.handlebars: {{s.modOffTopic}}
modImportant
../templates/vote-view.handlebars: {{s.modImportant}}
modSubmitInitialState
../templates/vote-view.handlebars: {{s.modSubmitInitialState}}
modSubmit
../templates/vote-view.handlebars: {{s.modSubmitInitialState}}
../templates/vote-view.handlebars: {{s.modSubmit}}
x_wrote
../templates/vote-view.handlebars: <a href="{{quote_src_url}}" target="_blank">{{s.x_wrote}}</a>
../templates/vote-view.handlebars: {{s.x_wrote}}
x_tweeted
../templates/carouselComment.handlebars: <a href="https://twitter.com/{{socialCtx.screen_name}}/status/{{tweet_id}}" target="_blank">{{s.x_tweeted}}</a>
../templates/carouselCommentMobile.handlebars: <a href="https://twitter.com/{{socialCtx.screen_name}}/status/{{tweet_id}}" target="_blank">{{s.x_tweeted}}</a>
../templates/vote-view.handlebars: <a href="https://twitter.com/{{social.screen_name}}/status/{{tweet_id}}" target="_blank">{{s.x_tweeted}}</a>
comments_remaining
../views/vote-view.js: ctx.remainingString = Strings.comments_remaining.replace("{{num_comments}}", remaining);
../views/vote-view.js: ctx.remainingStringScreenReader = Strings.comments_remaining2.replace("{{num_comments}}", remaining);
comments_remaining2
../views/vote-view.js: ctx.remainingStringScreenReader = Strings.comments_remaining2.replace("{{num_comments}}", remaining);
group_123
../templates/groupSelectionView.handlebars: {{s.group_123}}
../../vis2/components/curate.js: {this.props.Strings.group_123}
comment_123
../../vis2/components/tidCarousel.js: {this.props.Strings.comment_123}
majorityOpinion
../views/participation.js: name: (display.xs() ? Strings.majorityOpinionShort : Strings.majorityOpinion),
../../vis2/components/curate.js: {this.props.Strings.majorityOpinion}
majorityOpinionShort
../views/participation.js: name: (display.xs() ? Strings.majorityOpinionShort : Strings.majorityOpinion),
info
../views/participation.js: this.infoSlideViewModel = new Backbone.Model({
../views/participation.js: model: this.infoSlideViewModel,
addPolisToYourSite
../views/participation.js: var temp = Strings.addPolisToYourSite;
privacy
../templates/link-privacy-partial.handlebars: ">{{s.privacy}}</a>
TOS
../templates/link-TOS-partial.handlebars: {{s.TOS}}
writePrompt
../templates/comment-form.handlebars: placeholder="{{s.writePrompt}}"
anonPerson
../views/commentCarouselGroup.js: name: Strings.anonPerson,
../views/commentCarouselMajority.js: name: Strings.anonPerson,
../views/vote-view.js: name: Strings.anonPerson,
helpWhatAmISeeingTitle
../templates/conversationInfoSlideView.handlebars:{{!-- <p> <strong>{{s.helpWhatAmISeeingTitle}}</strong> {{s.helpWhatAmISeeing}} </p>
helpWhatAmISeeing
../templates/conversationInfoSlideView.handlebars:{{!-- <p> <strong>{{s.helpWhatAmISeeingTitle}}</strong> {{s.helpWhatAmISeeing}} </p>
helpWhatDoIDoTitle
../templates/conversationInfoSlideView.handlebars: <p> <strong> {{s.helpWhatDoIDoTitle}} </strong> {{s.helpWhatDoIDo}}</p> --}}
helpWhatDoIDo
../templates/conversationInfoSlideView.handlebars: <p> <strong> {{s.helpWhatDoIDoTitle}} </strong> {{s.helpWhatDoIDo}}</p> --}}
writeCommentHelpText
../templates/comment-form.handlebars: {{{s.writeCommentHelpText}}}
../templates/comment-form.handlebars: {{{s.writeCommentHelpText}}}
helpWriteListIntro
../templates/comment-form.handlebars: {{{s.helpWriteListIntro}}}
helpWriteListStandalone
../templates/comment-form.handlebars: <li>{{{s.helpWriteListStandalone}}}</li>
helpWriteListRaisNew
../templates/comment-form.handlebars: <li>{{{s.helpWriteListRaisNew}}}</li>
helpWriteListShort
../templates/comment-form.handlebars: <li>{{{s.helpWriteListShort}}}</li>
heresHowGroupVoted
../templates/commentCarouselGroup.handlebars: {{s.heresHowGroupVoted_sub}}
../views/commentCarouselGroup.js: // ctx.s.heresHowGroupVoted_sub = ctx.s.heresHowGroupVoted.replace("{{GROUP_NUMBER}}", ctx.selectedGroupName);
../views/commentCarouselGroup.js: var str = Strings.heresHowGroupVoted.replace("{{GROUP_NUMBER}}", selectedGroupName);
one_person
../views/commentCarouselGroup.js: var peopleLabel = (info.count>1) ? Strings.x_people : Strings.one_person;
x_people
../views/commentCarouselGroup.js: var peopleLabel = (info.count>1) ? Strings.x_people : Strings.one_person;
acrossAllPtpts
../templates/commentCarouselMajority.handlebars: {{s.acrossAllPtpts}}
xPtptsSawThisComment
../templates/carouselComment.handlebars: <em>{{s.xPtptsSawThisComment}}</em>
../templates/carouselCommentMobile.handlebars: <em>{{s.xPtptsSawThisComment}}</em>
xOfThoseAgreed
../templates/carouselComment.handlebars: <em>{{#if repfullForAgree}}{{s.xOfThoseAgreed}}{{else}}{{s.xOfthoseDisagreed}}{{/if}}</em>
../templates/carouselCommentMobile.handlebars: <em>{{#if repfullForAgree}}{{s.xOfThoseAgreed}}{{else}}{{s.xOfthoseDisagreed}}{{/if}}</em>
xOfthoseDisagreed
../templates/carouselComment.handlebars: <em>{{#if repfullForAgree}}{{s.xOfThoseAgreed}}{{else}}{{s.xOfthoseDisagreed}}{{/if}}</em>
../templates/carouselCommentMobile.handlebars: <em>{{#if repfullForAgree}}{{s.xOfThoseAgreed}}{{else}}{{s.xOfthoseDisagreed}}{{/if}}</em>
opinionGroups
../templates/participation.handlebars: {{s.opinionGroups}}
topComments
../templates/participation.handlebars: {{s.topComments}}
../views/participation.js: this.topCommentsCollection.reset(topComments);
../views/participation.js: this.topCommentsCollection = new CommentsCollection([]);
../views/participation.js: this.topCommentsView = this.addChild(new TopCommentsView({
../views/participation.js: collection: this.topCommentsCollection,
divisiveComments
../templates/participation.handlebars: {{s.divisiveComments}}
../views/participation.js: this.divisiveCommentsCollection.reset(divisiveComments);
../views/participation.js: this.divisiveCommentsCollection = new CommentsCollection([]);
../views/participation.js: this.divisiveCommentsView = this.addChild(new DivisiveCommentsView({
../views/participation.js: collection: this.divisiveCommentsCollection,
pctAgreed
../views/commentCarouselGroup.js: "<span class='a'>"+ Strings.pctAgreedOfGroup+"</span>" :
../views/commentCarouselMajority.js: "<span class='a'>"+Strings.pctAgreed+"</span>" :
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
../../vis2/components/exploreTid.js: let s = repfulForAgree ? Strings.pctAgreedLong : Strings.pctDisagreedLong;
pctDisagreed
../views/commentCarouselGroup.js: "<span class='d'>"+Strings.pctDisagreedOfGroup+"</span>";
../views/commentCarouselMajority.js: "<span class='d'>"+Strings.pctDisagreed+"</span>";
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
../../vis2/components/exploreTid.js: let s = repfulForAgree ? Strings.pctAgreedLong : Strings.pctDisagreedLong;
pctAgreedLong
../../vis2/components/exploreTid.js: let s = repfulForAgree ? Strings.pctAgreedLong : Strings.pctDisagreedLong;
pctAgreedOfGroup
../views/commentCarouselGroup.js: "<span class='a'>"+ Strings.pctAgreedOfGroup+"</span>" :
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
pctDisagreedOfGroup
../views/commentCarouselGroup.js: "<span class='d'>"+Strings.pctDisagreedOfGroup+"</span>";
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
pctDisagreedLong
../../vis2/components/exploreTid.js: let s = repfulForAgree ? Strings.pctAgreedLong : Strings.pctDisagreedLong;
pctAgreedOfGroupLong
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
pctDisagreedOfGroupLong
../../vis2/components/exploreTid.js: var s = repfulForAgree ? Strings.pctAgreedOfGroupLong : Strings.pctDisagreedOfGroupLong;
commentSent
../templates/comment-form.handlebars: {{s.commentSent}}
../templates/comment-form.handlebars: {{{s.commentSent}}}
commentSendFailed
../templates/comment-form.handlebars: {{{s.commentSendFailed}}}
../templates/comment-form.handlebars: {{{s.commentSendFailedDuplicate}}}
../templates/comment-form.handlebars: {{{s.commentSendFailedEmpty}}}
../templates/comment-form.handlebars: {{{s.commentSendFailedTooLong}}}
../views/comment-form.js: // alert(Strings.commentSendFailed);
commentSendFailedEmpty
../templates/comment-form.handlebars: {{{s.commentSendFailedEmpty}}}
commentSendFailedTooLong
../templates/comment-form.handlebars: {{{s.commentSendFailedTooLong}}}
commentSendFailedDuplicate
../templates/comment-form.handlebars: {{{s.commentSendFailedDuplicate}}}
commentErrorDuplicate
../views/comment-form.js: // alert(Strings.commentErrorDuplicate);
commentErrorConversationClosed
../templates/comment-form.handlebars: {{{s.commentErrorConversationClosed}}}
../views/comment-form.js: // alert(Strings.commentErrorConversationClosed);
commentIsEmpty
../views/comment-form.js: alert(Strings.commentIsEmpty);
commentIsTooLong
../views/comment-form.js: alert(Strings.commentIsTooLong);
hereIsNextStatement
../templates/vote-view.handlebars:<div id="hereIsNextStatementLabel" style="display: none" class="screen-reader-text" role="alert">{{s.hereIsNextStatement}}</div>
connectFacebook
../templates/comment-form.handlebars: {{s.connectFacebook}}</button>
../templates/vote-view.handlebars: {{s.connectFacebook}}</button>
connectTwitter
../templates/comment-form.handlebars: {{s.connectTwitter}}</button>
../templates/vote-view.handlebars: {{s.connectTwitter}}</button>
connectToPostPrompt
../templates/comment-form.handlebars: <div class="protip"><p><i class="fa fa-microphone"></i>&nbsp; {{s.connectToPostPrompt}}</p></div>
connectToVotePrompt
../templates/vote-view.handlebars: <div class="protip"><p><i class="fa fa-microphone"></i>&nbsp; {{s.connectToVotePrompt}}</p></div>
tip
../templates/comment-form.handlebars: {{{s.tipCommentsRandom}}}
../templates/comment-form.handlebars: <label for="comment_form_textarea" style="display:block">{{s.tipNoQuestions}}</label>
../templates/comment-form.handlebars: <label for="comment_form_textarea" style="display:block">{{s.tipOneIdea}}</label>
../templates/comment-form.handlebars: {{s.tipOneIdea}}
../templates/comment-form.handlebars: {{s.tipNoQuestions}}
../views/comment-form.js: ctx.charLimitString = Strings.tipCharLimit.replace("{{char_limit}}", constants.CHARACTER_LIMIT);
commentWritingTipsHintsHeader
../templates/comment-form.handlebars: <h2>{{s.commentWritingTipsHintsHeader}}</h2>
tipCharLimit
../views/comment-form.js: ctx.charLimitString = Strings.tipCharLimit.replace("{{char_limit}}", constants.CHARACTER_LIMIT);
tipCommentsRandom
../templates/comment-form.handlebars: {{{s.tipCommentsRandom}}}
tipOneIdea
../templates/comment-form.handlebars: <label for="comment_form_textarea" style="display:block">{{s.tipOneIdea}}</label>
../templates/comment-form.handlebars: {{s.tipOneIdea}}
tipNoQuestions
../templates/comment-form.handlebars: <label for="comment_form_textarea" style="display:block">{{s.tipNoQuestions}}</label>
../templates/comment-form.handlebars: {{s.tipNoQuestions}}
commentTooLongByChars
../views/comment-form.js: txt = Strings.commentTooLongByChars;
notSentSinceDemo
submitComment
../templates/comment-form.handlebars: {{s.submitComment}}
../views/comment-form.js: this.submitComment();
tipStarred
participantHelpWelcomeText
../templates/participation.handlebars: {{{s.participantHelpWelcomeText}}}
participantHelpGroupsText
../templates/participation.handlebars: {{{s.participantHelpGroupsText}}}
participantHelpGroupsNotYetText
../templates/participation.handlebars: {{{s.participantHelpGroupsNotYetText}}}
helpWhatAreGroupsDetail
../templates/participation.handlebars: {{{s.helpWhatAreGroupsDetail}}}
socialConnectPrompt
../templates/participation.handlebars: {{s.socialConnectPrompt}}
connectFbButton
../templates/participation.handlebars: {{s.connectFbButton}}
connectTwButton
../templates/participation.handlebars: {{s.connectTwButton}}
polis_err_reg_fb_verification_email_sent
../util/facebookButton.js: alert(Strings.polis_err_reg_fb_verification_email_sent);
polis_err_reg_fb_verification_noemail_unverified
../util/facebookButton.js: alert(Strings.polis_err_reg_fb_verification_noemail_unverified);
showTranslationButton
../views/vote-view.js: ctx.showTranslationButton = Strings.showTranslationButton;
../views/vote-view.js: ctx.showTranslationButton = Strings.showTranslationButton;
hideTranslationButton
../templates/vote-view.handlebars: " id="hideTranslationButtonVoteView">{{s.hideTranslationButton}}</button>
thirdPartyTranslationDisclaimer
../views/vote-view.js: ctx.thirdPartyTranslationDisclaimer = Strings.thirdPartyTranslationDisclaimer;
notificationsAlreadySubscribed
../templates/vote-view.handlebars: {{s.notificationsAlreadySubscribed}}
notificationsGetNotified
../templates/vote-view.handlebars: <p>{{s.notificationsGetNotified}}</p>
notificationsEnterEmail
../templates/vote-view.handlebars: <p>{{s.notificationsEnterEmail}}</p>
labelEmail
../templates/vote-view.handlebars: <label class="FormLabel" for="gatekeeperEmailCreate">{{s.labelEmail}}</label>
notificationsSubscribeButton
../templates/vote-view.handlebars: ">{{s.notificationsSubscribeButton}}</button>
notificationsSubscribeErrorAlert
../views/vote-view.js: alert(Strings.notificationsSubscribeErrorAlert);
noCommentsYet
../views/vote-view.js: message1 = Strings.noCommentsYet;
../views/vote-view.js: message2 = Strings.noCommentsYetSoInvite;
../views/vote-view.js: message2 = Strings.noCommentsYetSoWrite;
noCommentsYetSoWrite
../views/vote-view.js: message2 = Strings.noCommentsYetSoWrite;
noCommentsYetSoInvite
../views/vote-view.js: message2 = Strings.noCommentsYetSoInvite;
noCommentsYouVotedOnAll
../views/vote-view.js: message1 = Strings.noCommentsYouVotedOnAll;
noCommentsTryWritingOne
../views/vote-view.js: message2 = Strings.noCommentsTryWritingOne;
convIsClosed
../views/vote-view.js: txt1: Strings.convIsClosed,
noMoreVotingAllowed
../views/vote-view.js: txt2: Strings.noMoreVotingAllowed,
topic_good_01
topic_good_01_reason
topic_good_02
topic_good_02_reason
topic_good_03
topic_bad_01
topic_bad_01_reason
topic_bad_02
topic_bad_02_reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment